Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::encoder Namespace Reference

Convenience layer: read an encoder. More...

Detailed Description

Convenience layer: read an encoder.

Typedefs

using Encoder = sbl::components::input::Encoder
 

Functions

template<typename Driver >
void read (Encoder &enc, const GpioHandle &a, const GpioHandle &b)
 Read quadrature GPIO pins and feed into Encoder.
 

Typedef Documentation

◆ Encoder

Definition at line 23 of file input.hpp.

Function Documentation

◆ read()

template<typename Driver >
void sbl::encoder::read ( Encoder &  enc,
const GpioHandle &  a,
const GpioHandle &  b 
)
inline

Read quadrature GPIO pins and feed into Encoder.

Template Parameters
DriverGPIO driver type (e.g., sbl::driver::Gpio)
Parameters
encEncoder instance to update
aGPIO handle for channel A
bGPIO handle for channel B
Note
ISR-safe — two GPIO register reads

Definition at line 36 of file input.hpp.

References sbl::components::input::Encoder::update().