-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
enableInterrupt Pin Parameter Different from other Single Pin Interface Functions #47
Comments
Thanks for the issue, Think your observation makes sense, have to study the datasheet again on this topic.
Please create a PR, Note to myself: check MCP23017/008/S08 repo's too (look alikes) |
@GlibSkunk (enable interrupt context) Side effect should be that the indices do not match. No time to fix it completely (including testing) yet but I will try understand the proposed code today. Noticed there is a bug in the existing code. |
Yes, read and understood your code proposal and I will merge it asap. I need to bump the version info etc, thereafter. Thanks again for spotting and reporting and fixing the issue, appreciated. |
Created a develop branch for version 0.6.0 which includes your fix, updated readme, updated version. |
I presume this is not intended behavior, so I thought I'd bring this to your attention. I ran into an issue today trying to set up interrupts on specific pins using the single pin interface (rather than all the 16 pin functions). The final distinction I noticed is that this section of code (or a similar construction) appears in all single pin interface functions except for enableInterrupt().
The upshot is that to set up an interrupt on GPA0, I have to use:
This is not very intuitive and I presume all that would need to be modified within enableInterrupt() is adding the section that translates 0..15 into pins assuming 0..7 are within Port A and 8..15 are within Port B. If you agree that this should be done, I can make a pull request (my second ever, so excuse me if it takes a couple tries :) )
The text was updated successfully, but these errors were encountered: