|
FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
API that handles a given analog input pin of the target MCU. More...
#include <fastarduino/analog_input.h>

Public Types | |
| using | SAMPLE_TYPE = SAMPLE_TYPE_ |
The type of samples returned by sample(). More... | |
| using | TYPE = SAMPLE_TYPE |
The type of samples returned by sample(). More... | |
Public Member Functions | |
| AnalogInput (const AnalogInput &)=delete | |
| AnalogInput & | operator= (const AnalogInput &)=delete |
| SAMPLE_TYPE | sample () |
| Start an analog-digital conversion for this analog input pin and return sample value. More... | |
Static Public Attributes | |
| static constexpr const board::AnalogPin | APIN = APIN_ |
| The analog pin for this AnalogInput; this may also not be a real pin but an internal sensor (e.g. More... | |
| static constexpr const board::AnalogReference | AREF = AREF_ |
| The analog reference to use for that analog input. More... | |
| static constexpr const board::AnalogClock | MAXFREQ = MAXFREQ_ |
| The maximum input clock frequency of the ADC circuit; higher frequencies imply lower precision of samples. More... | |
| static constexpr const uint8_t | PRESCALER = FREQ_TRAIT::PRESCALER |
The prescaler used by ADC circuitry, calculated from MAXFREQ template parameter. More... | |
API that handles a given analog input pin of the target MCU.
| APIN_ | a unique analog pin for the MCU target; this may also not be a real pin but an internal sensor (e.g. temperature or bandgap). |
| AREF_ | the analog reference to use for that input |
| SAMPLE_TYPE_ | the type of samples, either uint8_t (8 bits) or uint16_t (10 bits) |
| MAXFREQ_ | the maximum input clock frequency of the ADC circuit; higher frequencies imply lower precision of samples. |
Definition at line 51 of file analog_input.h.
| using analog::AnalogInput< APIN_, SAMPLE_TYPE_, AREF_, MAXFREQ_ >::SAMPLE_TYPE = SAMPLE_TYPE_ |
The type of samples returned by sample().
Definition at line 66 of file analog_input.h.
| using analog::AnalogInput< APIN_, SAMPLE_TYPE_, AREF_, MAXFREQ_ >::TYPE = SAMPLE_TYPE |
The type of samples returned by sample().
Definition at line 90 of file analog_input.h.
|
inline |
Start an analog-digital conversion for this analog input pin and return sample value.
Definition at line 104 of file analog_input.h.
|
staticconstexpr |
The analog pin for this AnalogInput; this may also not be a real pin but an internal sensor (e.g.
temperature or bandgap).
Definition at line 58 of file analog_input.h.
|
staticconstexpr |
The analog reference to use for that analog input.
Definition at line 62 of file analog_input.h.
|
staticconstexpr |
The maximum input clock frequency of the ADC circuit; higher frequencies imply lower precision of samples.
Definition at line 71 of file analog_input.h.
|
staticconstexpr |
The prescaler used by ADC circuitry, calculated from MAXFREQ template parameter.
Definition at line 96 of file analog_input.h.