Use init() instead of constructor.

This commit is contained in:
Balazs Kelemen
2022-01-11 13:12:04 +01:00
parent fbd5b8b721
commit b832b82ec6
5 changed files with 38 additions and 16 deletions

View File

@@ -2,17 +2,22 @@
RotaryEncoderInterruptImpl1 *rotaryEncoderInterruptImpl1;
RotaryEncoderInterruptImpl1::RotaryEncoderInterruptImpl1(
uint8_t pinA, uint8_t pinB, uint8_t pinPress,
char eventCw, char eventCcw, char eventPressed) :
RotaryEncoderInterruptImpl1::RotaryEncoderInterruptImpl1() :
RotaryEncoderInterruptBase(
"rotEnc1",
"rotEnc1")
{
}
void RotaryEncoderInterruptImpl1::init(
uint8_t pinA, uint8_t pinB, uint8_t pinPress,
char eventCw, char eventCcw, char eventPressed)
{
RotaryEncoderInterruptBase::init(
pinA, pinB, pinPress,
eventCw, eventCcw, eventPressed,
RotaryEncoderInterruptImpl1::handleIntA,
RotaryEncoderInterruptImpl1::handleIntB,
RotaryEncoderInterruptImpl1::handleIntPressed)
{
RotaryEncoderInterruptImpl1::handleIntPressed);
}
void RotaryEncoderInterruptImpl1::handleIntA()