|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
ADC DMA scan interface — continuous multi-channel acquisition. More...
Go to the source code of this file.
Namespaces | |
| namespace | sbl |
| Root namespace for all Sound Byte Libs functionality. | |
| namespace | sbl::adc |
Functions | |
| template<typename Driver > | |
| void | sbl::adc::start_scan (const AdcHandle *channels, uint8_t num_channels, uint16_t *buffer, SampleTime sample_time=SampleTime::Slow) |
| Start continuous DMA scan of multiple ADC channels. | |
| template<typename Driver > | |
| void | sbl::adc::stop_scan () |
| Stop DMA scan mode. | |
ADC DMA scan interface — continuous multi-channel acquisition.
Platform-agnostic interface for DMA-based ADC scanning. The driver handles all DMA configuration internally; the HAL just forwards calls.
Usage: #include <sbl/hal/adc/scan.hpp>
SBL_DMA_BUFFER static volatile uint16_t adc_buf[2]; const sbl::AdcHandle channels[] = { sbl::hw::adc::knob1, sbl::hw::adc::knob2 }; sbl::adc::start_scan<sbl::driver::Adc>(channels, 2, adc_buf);
// Main loop: just read adc_buf[0], adc_buf[1] — always fresh
Definition in file scan.hpp.