firmware/src/plugins/input/RotaryEncoderInterruptImpl1.cpp

35 lines
935 B
C++
Raw Normal View History

2022-01-09 09:08:31 +00:00
#include "RotaryEncoderInterruptImpl1.h"
RotaryEncoderInterruptImpl1 *rotaryEncoderInterruptImpl1;
2022-01-11 12:12:04 +00:00
RotaryEncoderInterruptImpl1::RotaryEncoderInterruptImpl1() :
2022-01-09 09:08:31 +00:00
RotaryEncoderInterruptBase(
2022-01-11 12:12:04 +00:00
"rotEnc1")
{
}
void RotaryEncoderInterruptImpl1::init(
uint8_t pinA, uint8_t pinB, uint8_t pinPress,
char eventCw, char eventCcw, char eventPressed)
{
RotaryEncoderInterruptBase::init(
2022-01-09 09:08:31 +00:00
pinA, pinB, pinPress,
eventCw, eventCcw, eventPressed,
RotaryEncoderInterruptImpl1::handleIntA,
RotaryEncoderInterruptImpl1::handleIntB,
2022-01-11 12:12:04 +00:00
RotaryEncoderInterruptImpl1::handleIntPressed);
2022-01-09 09:08:31 +00:00
}
void RotaryEncoderInterruptImpl1::handleIntA()
{
2022-01-09 20:14:23 +00:00
rotaryEncoderInterruptImpl1->intAHandler();
2022-01-09 09:08:31 +00:00
}
void RotaryEncoderInterruptImpl1::handleIntB()
{
2022-01-09 20:14:23 +00:00
rotaryEncoderInterruptImpl1->intBHandler();
2022-01-09 09:08:31 +00:00
}
void RotaryEncoderInterruptImpl1::handleIntPressed()
{
2022-01-09 20:14:23 +00:00
rotaryEncoderInterruptImpl1->intPressHandler();
2022-01-09 09:08:31 +00:00
}