16#ifndef SBL_HAL_POT_INPUT_HPP_
17#define SBL_HAL_POT_INPUT_HPP_
41template<
typename Driver>
44 uint16_t raw = adc::read<Driver>(handle, sample_time);
63 uint8_t channel_index) {
64 auto raw =
static_cast<const volatile uint16_t*
>(buffer)[channel_index];
Potentiometer with EWMA smoothing, deadband, and change detection.
uint16_t value() const
Current stable (deadbanded) value (0-65535)
void update(uint16_t raw)
Feed a new raw ADC sample through EWMA → deadband check.
ADC driver interface - canonical types for MCU driver implementations.
SampleTime
ADC sample time configuration.
uint16_t read_dma(Pot &pot, const uint16_t *buffer, uint8_t channel_index)
Read from DMA scan buffer and feed into Pot.
uint16_t read(Pot &pot, const AdcHandle &handle, adc::SampleTime sample_time=adc::SampleTime::Slow)
Read ADC channel and feed into Pot (EWMA + deadband)
Root namespace for all Sound Byte Libs functionality.
Potentiometer component — smoothed ADC with deadband + change detection.