adafruit / Adafruit-MCP23017-Arduino-Library

Arduino Library for Adafruit MCP23017
Other
355 stars 204 forks source link

Port B interrupt fixes #66

Closed Donkie closed 3 years ago

Donkie commented 3 years ago

A code bug seems to have snuck into line 225, causing it to read Port A's INTF register when it should've actually read Port B. Updated line 213 similarly for clarity.

Also, fixes so that if it were a Port B pin that triggered the interrupt, the appropriate INTCAP register will be read. Previously, only the Port A INTCAP register was always read.

caternuson commented 3 years ago

Thanks for spotting that. That does appear to be a misplaced parans. Also good catch on the INTCAP clearing.

Do you know how to run clang-format so the CI will pass?

Donkie commented 3 years ago

Sorry for the delay, ran the formatter now @caternuson

caternuson commented 3 years ago

Awesome. Thanks for the fixes!