sparkfun / SparkFun_SX1509_Arduino_Library

Arduino library for the SX1509 16-I/O GPIO expander.
44 stars 38 forks source link

Reading from Interrupt Register A #16

Closed gb-123-git closed 2 years ago

gb-123-git commented 2 years ago

https://github.com/sparkfun/SparkFun_SX1509_Arduino_Library/blob/3a67e6986c3d018dad2060f5b0cc21cb9a6ce3e4/src/SparkFunSX1509.cpp#L631

I can only see REG_INTERRUPT_SOURCE_B here. What about REG_INTERRUPT_SOURCE_A ? Is it automatically read or is there something missing here ?

gb-123-git commented 2 years ago

Anyone got interrupts to work?

I am using the following code : sx.begin(address); uint16_t intStatus = sx.interruptSource(); // Read and clear int status Serial.println("intstatus:"+String(intStatus, BIN));

Ofcourse I have also followed the other example and added the requisite lines for enabling interrupt, but somehow I am getting intStatus = 0 everytime.

gb-123-git commented 2 years ago

It reads values from register A also. Closing this issue for now.