Sygaldry
Loading...
Searching...
No Matches
sygaldry::sygse::OneshotAdc< gpio_num > Struct Template Reference

Driver component for the analog-digital converter. More...

Inheritance diagram for sygaldry::sygse::OneshotAdc< gpio_num >:
sygaldry::name_<"ESP32 Oneshot ADC"> sygaldry::author_<"Travis J. West"> sygaldry::copyright_<"Copyright 2023 Sygaldry Contributors"> sygaldry::license_<"SPDX-License-Identifier: MIT">

Public Types

using outputs_t = OneshotAdcOutputs
 

Public Member Functions

void init ()
 Configure the ADC1 channel for the given gpio_num in oneshot read mode.
 
void main ()
 Poll the current value of the given ADC1 channel.
 

Public Attributes

outputs_t outputs
 
detail::OneshotAdcImpl pimpl
 

Additional Inherited Members

- Static Public Member Functions inherited from sygaldry::name_<"ESP32 Oneshot ADC">
static _consteval auto name ()
 
- Static Public Member Functions inherited from sygaldry::author_<"Travis J. West">
static _consteval auto author ()
 
- Static Public Member Functions inherited from sygaldry::copyright_<"Copyright 2023 Sygaldry Contributors">
static _consteval auto copyright ()
 
- Static Public Member Functions inherited from sygaldry::license_<"SPDX-License-Identifier: MIT">
static _consteval auto license ()
 

Detailed Description

template<syghe::AdcChannel gpio_num>
struct sygaldry::sygse::OneshotAdc< gpio_num >

Driver component for the analog-digital converter.

OneshotAdc* configures analog-digital converter 1 (ADC1) to read in oneshot mode from the given GPIO pin and polls its current value in each loop.

Template Parameters
gpio_numThe GPIO number associated with the channel to read. See sygse-adc-intantiations for guidance on which GPIO number corresponds to which ADC channel.

The documentation for this struct was generated from the following file: