Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
Typedefs | Functions
sbl::button Namespace Reference

Typedefs

using Button = sbl::components::control::Button
 
using ButtonConfig = sbl::components::control::ButtonConfig
 

Functions

template<typename Driver >
void read (Button &btn, const GpioHandle &handle)
 Read GPIO pin and feed into Button (debounce + edge detection)
 

Typedef Documentation

◆ Button

Definition at line 23 of file input.hpp.

◆ ButtonConfig

Definition at line 24 of file input.hpp.

Function Documentation

◆ read()

template<typename Driver >
void sbl::button::read ( Button btn,
const GpioHandle handle 
)
inline

Read GPIO pin and feed into Button (debounce + edge detection)

Gpio::read() returns logical value (active_low handled by driver), so Button doesn't need inversion logic.

Template Parameters
DriverGPIO driver type (e.g., sbl::driver::Gpio)
Parameters
btnButton instance to update
handleGPIO handle for the button pin
Note
ISR-safe — single GPIO register read

Definition at line 39 of file input.hpp.

References sbl::components::control::Button::update().

Here is the call graph for this function: