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

Pot input convenience functions. More...

#include <sbl/hal/adc/driver.hpp>
#include <sbl/components/control/pot.hpp>
Include dependency graph for input.hpp:

Go to the source code of this file.

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs functionality.
 
namespace  sbl::pot
 

Typedefs

using sbl::pot::Pot = sbl::components::control::Pot
 
using sbl::pot::PotConfig = sbl::components::control::PotConfig
 

Functions

template<typename Driver >
uint16_t sbl::pot::read (Pot &pot, const AdcHandle &handle, adc::SampleTime sample_time=adc::SampleTime::Slow)
 Read ADC channel and feed into Pot (EWMA + deadband)
 
uint16_t sbl::pot::read_dma (Pot &pot, const uint16_t *buffer, uint8_t channel_index)
 Read from DMA scan buffer and feed into Pot.
 

Detailed Description

Pot input convenience functions.

Composes ADC driver reads with Pot update in a single call. Same pattern as sbl::cv::read<Driver>() / sbl::cv::read_dma().

Usage: #include <sbl/hal/pot/input.hpp>

sbl::pot::read<sbl::driver::Adc>(knob, handle, SampleTime::Slow); sbl::pot::read_dma(knob, adc_buf, 0);

Definition in file input.hpp.