Merge pull request #791 from rmccaskill/master

Fix _irq_handler
This commit is contained in:
Ha Thach authored and GitHub committed 2023-10-16 15:30:00 +07:00
commit af19cea314
1 file changed
+3 -3
+3 -3
View File
@@ -120,14 +120,14 @@ void SwRotaryEncoder::clearAbs(void)
void SwRotaryEncoder::_irq_handler(void)
{
uint32_t val = NRF_GPIO->IN;
uint8_t bita = bitRead(val, _pina);
uint8_t bita = digitalRead(_pina);
uint8_t bitb = digitalRead(_pinb);
if ( bita != _a_last)
{
int32_t step;
if ( bita != bitRead(val, _pinb) )
if ( bita != bitb )
{
step = 1;
}else