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::components::input::EncoderStep Class Reference

Detailed Description

Definition at line 24 of file encoder_step.hpp.

#include <encoder_step.hpp>

Public Member Functions

 EncoderStep (int8_t divisor=4)
 
int8_t process (int32_t raw_delta)
 Feed raw encoder delta, returns step (-1, 0, or +1).
 
int8_t accumulator () const
 Current accumulator value.
 
void reset ()
 Reset accumulator to zero.
 

Constructor & Destructor Documentation

◆ EncoderStep()

sbl::components::input::EncoderStep::EncoderStep ( int8_t  divisor = 4)
inlineexplicit
Parameters
divisorPulses per detent (e.g., 4 for EC11). Must be >= 1.

Definition at line 27 of file encoder_step.hpp.

Member Function Documentation

◆ process()

int8_t sbl::components::input::EncoderStep::process ( int32_t  raw_delta)
inline

Feed raw encoder delta, returns step (-1, 0, or +1).

Definition at line 31 of file encoder_step.hpp.

◆ accumulator()

int8_t sbl::components::input::EncoderStep::accumulator ( ) const
inline

Current accumulator value.

Definition at line 45 of file encoder_step.hpp.

◆ reset()

void sbl::components::input::EncoderStep::reset ( )
inline

Reset accumulator to zero.

Definition at line 48 of file encoder_step.hpp.


The documentation for this class was generated from the following file: