|
template<class... Signals> |
static void | connect () |
|
template<class SystemClock , frequency_t frequency = kHz(100), percent_t tolerance = pct(10)> |
static void | initialize () |
|
static void | disable () |
|
static void | startConversion () |
|
static bool | isConversionFinished () |
|
static uint16_t | getValue () |
|
static uint16_t | readChannel (Channel channel) |
|
static bool | setChannel (Channel channel) |
|
static uint8_t | getChannel () |
|
static void | enableFreeRunningMode () |
|
static void | diableFreeRunningMode () |
|
static void | setLeftAdjustResult () |
|
static void | setRightAdjustResult () |
|
static void | setReference (Reference reference) |
|
static void | enableInterrupt () |
| Enables the ADC Conversion Complete Interrupt.
|
|
static void | disableInterrupt () |
| Disables the ADC Conversion Complete Interrupt.
|
|
static bool | getInterruptFlag () |
|
static InterruptFlag_t | getInterruptFlags () |
|
static void | acknowledgeInterruptFlag () |
| Clears the interrupt flag.
|
|
static void | acknowledgeInterruptFlags (const InterruptFlag_t flags) |
| Clears the interrupt flag if flags is set to InterruptFlag::All
|
|
static void | enableAutoTrigger () |
|
static void | disableAutoTrigger () |
| disable auto triggering of the ADC
|
|
static void | setAutoTriggerSource (uint8_t source) |
|
template<uint64_t available, uint64_t requested, percent_t tolerance> |
static void | assertBaudrateInTolerance () |
|
template<double available, double requested, percent_t tolerance> |
static void | assertDurationInTolerance () |
|
static void | configurePurpose () |
| configures a peripheral for a specific purpose
|
|
static void | disableFreeRunningMode () |
|
static void | getParameter () |
| returns a parameter
|
|
static void | setParameter () |
| sets a parameter
|
|
Generic Analog/Digital-Converter module
This class aims at providing a common interface to all the different register layouts of the ADC modules in most ATtinys. It takes into consideration restrictions and extensions in ADC functionality and provides the appropriate methods to configure them.
This class enables you to address and use a broader array of ATtinys with similar ADC functionality without changing a single line of code.
For best use of this class, check your device's datasheet for the supported functionality.
ADC clock frequency should be between 50 and 200 kHz for maximum resolution. If less than the full resolution of 10 bits are needed the frequency can be higher.
- Author
- Niklas Hauser