|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
ADC driver interface - canonical types for MCU driver implementations. More...
ADC driver interface - canonical types for MCU driver implementations.
This header provides everything an ADC driver needs:
Drivers implement the following static interface:
The core library provides convenience functions that compose the low-level primitives:
Usage in driver:
Definition in file driver.hpp.
Go to the source code of this file.
Namespaces | |
| namespace | sbl |
| Root namespace for all Sound Byte Libs code. | |
| namespace | sbl::adc |
| Convenience layer: read a channel, start and stop a scan. | |
Typedefs | |
| using | sbl::adc::SampleTime = sbl::hal::adc::SampleTime |
| using | sbl::adc::Resolution = sbl::hal::adc::Resolution |
Functions | |
| template<typename Driver > | |
| uint16_t | sbl::adc::read (const AdcHandle &handle, SampleTime sample_time=SampleTime::Medium) |
| Blocking single-channel ADC read. | |
| template<typename Driver > | |
| uint32_t | sbl::adc::to_millivolts (uint16_t raw_value, uint32_t vref_mv=3300) |
| Convert raw ADC value to voltage (millivolts) | |