|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Typedefs | |
| using | Pot = sbl::components::control::Pot |
| using | PotConfig = sbl::components::control::PotConfig |
Functions | |
| template<typename Driver > | |
| uint16_t | read (Pot &pot, const AdcHandle &handle, adc::SampleTime sample_time=adc::SampleTime::Slow) |
| Read ADC channel and feed into Pot (EWMA + deadband) | |
| uint16_t | read_dma (Pot &pot, const uint16_t *buffer, uint8_t channel_index) |
| Read from DMA scan buffer and feed into Pot. | |
| using sbl::pot::Pot = typedef sbl::components::control::Pot |
| using sbl::pot::PotConfig = typedef sbl::components::control::PotConfig |
|
inline |
Read ADC channel and feed into Pot (EWMA + deadband)
Blocking read followed by Pot::update(). Returns the stable value.
| Driver | ADC driver type (e.g., sbl::driver::Adc) |
| pot | Pot instance to update |
| handle | ADC channel handle |
| sample_time | Sampling duration (default: Slow for pot sources) |
Definition at line 42 of file input.hpp.
References sbl::components::control::Pot::update(), and sbl::components::control::Pot::value().
|
inline |
Read from DMA scan buffer and feed into Pot.
For use with sbl::adc::start_scan(). Casts to volatile to ensure the compiler generates a real memory read (buffer updated by DMA hardware).
| pot | Pot instance to update |
| buffer | DMA scan buffer (from start_scan) |
| channel_index | Index of this channel in the scan sequence |
Definition at line 62 of file input.hpp.
References sbl::components::control::Pot::update(), and sbl::components::control::Pot::value().