Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
Namespaces | Functions
scan.hpp File Reference

ADC DMA scan interface — continuous multi-channel acquisition. More...

#include "handle.hpp"
#include "types.hpp"
Include dependency graph for scan.hpp:

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.
 

Detailed Description

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.