Skip to content

Commit

Permalink
Merge pull request #17 from jpconstantineau/update-libraries
Browse files Browse the repository at this point in the history
updated max number of encoders to 8
  • Loading branch information
jpconstantineau authored Mar 27, 2021
2 parents fa6a390 + 1c29d33 commit 53d8430
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions libraries/RotaryEncoder/SwRotaryEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ extern "C"
_pina_irqn(1)
_pina_irqn(2)
_pina_irqn(3)
// _pina_irqn(4)
// _pina_irqn(5)
// _pina_irqn(6)
// _pina_irqn(7)
_pina_irqn(4)
_pina_irqn(5)
_pina_irqn(6)
_pina_irqn(7)
// add more to match SW_ROTARY_ENCODER_MAX_INSTANCE
}

Expand All @@ -62,7 +62,7 @@ static SwRotaryEncoder* _encoder_ptr[SW_ROTARY_ENCODER_MAX_INSTANCE] = { NULL };
static voidFuncPtr _pina_irq_ptr[SW_ROTARY_ENCODER_MAX_INSTANCE] =
{
_pina_irqn_0, _pina_irqn_1, _pina_irqn_2, _pina_irqn_3,
// _pina_irqn_4, _pina_irqn_5, _pina_irqn_6, _pina_irqn_7
_pina_irqn_4, _pina_irqn_5, _pina_irqn_6, _pina_irqn_7
};

bool SwRotaryEncoder::begin(uint8_t pina, uint8_t pinb)
Expand Down
2 changes: 1 addition & 1 deletion libraries/RotaryEncoder/SwRotaryEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

#include "Arduino.h"

#define SW_ROTARY_ENCODER_MAX_INSTANCE 4
#define SW_ROTARY_ENCODER_MAX_INSTANCE 8

class SwRotaryEncoder
{
Expand Down

0 comments on commit 53d8430

Please sign in to comment.