IoAbstraction
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AbstractHwRotaryEncoder Class Reference
Inheritance diagram for AbstractHwRotaryEncoder:
RotaryEncoder HardwareRotaryEncoder HwStateRotaryEncoder

Public Member Functions

 AbstractHwRotaryEncoder (EncoderCallbackFn callback)
 
 AbstractHwRotaryEncoder (EncoderListener *listener)
 
void setAccelerationMode (HWAccelerationMode mode)
 
void setEncoderType (EncoderType et)
 
- Public Member Functions inherited from RotaryEncoder
 RotaryEncoder (EncoderCallbackFn callback)
 
 RotaryEncoder (EncoderListener *listener)
 
void changePrecision (uint16_t maxValue, int currentValue, bool rolloverOnMax=false, int step=1)
 
void replaceCallback (EncoderCallbackFn callbackFn)
 
void replaceCallbackListener (EncoderListener *callbackFn)
 
int getCurrentReading () const
 
void setCurrentReading (int reading)
 
void increment (int8_t incVal)
 
virtual void encoderChanged ()
 
bool didLastSyncSucceed ()
 
void setUserIntention (EncoderUserIntention intention)
 
EncoderUserIntention getUserIntention ()
 
void runCallback (int newVal)
 
bsize_t getMaximumValue ()
 

Protected Member Functions

void initialiseBase (pinid_t pinA, pinid_t pinB, HWAccelerationMode accelerationMode, EncoderType)
 
int amountFromChange (unsigned long change)
 
void handleChangeRaw (bool increase)
 

Protected Attributes

unsigned long lastChange
 
pinid_t pinA
 
pinid_t pinB
 
HWAccelerationMode accelerationMode
 
EncoderType encoderType
 
- Protected Attributes inherited from RotaryEncoder
uint16_t maximumValue
 
uint16_t currentReading
 
uint8_t stepSize
 
union {
EncoderCallbackFn callback
 
EncoderListenerencoderListener
 
notify
 
uint8_t flags
 
EncoderUserIntention intent
 

Additional Inherited Members

- Protected Types inherited from RotaryEncoder
enum  EncoderFlagBits { LAST_SYNC_STATUS =0 , WRAP_AROUND_MODE , OO_LISTENER_CALLBACK , LAST_ENCODER_DIRECTION_UP }
 

Member Function Documentation

◆ setAccelerationMode()

void AbstractHwRotaryEncoder::setAccelerationMode ( HWAccelerationMode  mode)
inline

Allows for changes in the acceleration mode at runtime

Parameters
modethe new acceleration mode

◆ setEncoderType()

void AbstractHwRotaryEncoder::setEncoderType ( EncoderType  et)
inline

Allows for changes in encoder type at runtime

Parameters
encoderTypechange in encoder type

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