-
Notifications
You must be signed in to change notification settings - Fork 205
Turn off Interrupt Triggers and Pull Up Resistors on begin() #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
If an interrupt comes before the board is ready, the interrupt pin does not get reset until a read is made from A/B (if mirrored).
kk please check the CI errors and once passing, tag me to review! |
@ladyada ugh I have a learning curve on GitHub... I don't know what the problem is. It runs fine for me, I don't know how it could verify with a MCP23017 lol |
@PsuFan Hey! What GitHub Actions is currently failing on is the clang-format check. You can find out how to install and run that here: https://learn.adafruit.com/the-well-automated-arduino-library/formatting-with-clang-format If you have any questions about doing that, or you find anything confusing, let me know (please @ ping me because there's a much higher chance I'll see it if you do). Also, don't worry about not knowing GitHub super well. We all had to learn it at some point. Thanks! |
@dherrada clang-format returns nothing... ESP8266 Serial\RFIDDoorSystem>clang-format -i Adafruit_MCP23017.cpp ESP8266 Serial\RFIDDoorSystem> |
@PsuFan Looks like you've got some trailing whitespace on lines 12, 16, and 19, although it is pretty odd that clang didn't catch that. Maybe try running it again and then just do it manually if it doesn't fix it. |
Yeah, it's not supposed to return anything. It just edits the files for you |
Line 12, 16, 19? I've only added lines 132-138. I'm using Windows and just editing on GitHub.com, I don't have sync setup. |
@PsuFan Oh yah, you're definitely right. I misread the CI readout |
Adafruit_MCP23017.cpp
Outdated
/** | ||
* Disable a pin for interrupt. | ||
* | ||
* @param pin Pin to set | ||
* | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason you removed this? It's causing the Doxygen check to fail
@PsuFan The good news is that the clang check is passing. See above for the doxygen (documentation) check. |
clang-format removed it... Putting it back in now... |
@PsuFan Looks like it's passing. Good job! |
@ladyada Am I good to merge? |
Adafruit_MCP23017.cpp
Outdated
@@ -124,10 +124,20 @@ void Adafruit_MCP23017::begin(uint8_t addr, TwoWire *theWire) { | |||
|
|||
_wire->begin(); | |||
|
|||
_wire->setClock(400000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz remove
close! one request |
Oops, that wasn't supposed to be in there. That actually gave me increased bandwidth when reading RFID reader! |
thanks! okay I have one more in examples :S EDIT: oh that already got pushed, cool. Yeah that was messing me up for a while too. If you miss the FALL event and don't read the interrupt, you don't get any after that. |
Describe the scope of your change--i.e. what the change does and what parts
of the code were modified.
Turn off Interrupt Triggers and Pull Up Resistors on begin()
Describe any known limitations with your change.
None
Please run any tests or examples that can exercise your modified code.
Fully tested by compiling with MCP.pullUp(0, HIGH); checking voltage, commenting out and recompiling.