Skip to content

Add interrupt support & examples to MCP23017 #7

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

Merged
merged 5 commits into from
Feb 22, 2019

Conversation

ladyada
Copy link
Member

@ladyada ladyada commented Feb 2, 2019

this is for a gpio expander bonnet, can now manipulate the IRQ control registers. also set default to be IRQ pins are open drain.

@ladyada ladyada requested a review from a team February 2, 2019 20:39
Copy link

@siddacious siddacious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good but I don't have the hardware to test so I'll leave it to you to merge or for someone else to test if need be.

As a general comment about this lib I am kinda 🤷‍♂️ about exposing lightly wrapped registers; on one hand it's great for those who know what they're doing, but maybe not so useful for fresh circuit pythonistas? Then I suppose that ship has sailed.

@ladyada
Copy link
Member Author

ladyada commented Feb 3, 2019

normally i wouldnt...i guess i could try to abstract em but it'd get really 'wordy' - this was to test a new hardware.

@tannewt
Copy link
Member

tannewt commented Feb 4, 2019

+1 to renaming the properties to fully explain what they are. The comments are really handy so by renaming we'll remove any hint of data sheet-ism.

@ladyada
Copy link
Member Author

ladyada commented Feb 4, 2019

but, they'd still need to be assigned and read as if they were the registers... zat ok?

@tannewt
Copy link
Member

tannewt commented Feb 6, 2019

Sorry it took me a while to get back.

Ya, I think it's fine that they are bitmasks. The documentation makes that clear. The fact that they map to a register under the hood isn't important though.

@ladyada
Copy link
Member Author

ladyada commented Feb 6, 2019

added/updated!
take a look

@ladyada
Copy link
Member Author

ladyada commented Feb 22, 2019

@tannewt ok im gonna merge this - next time i sweep thru this library ill update them to registers, i think perhaps this was written pre-register

@ladyada ladyada merged commit da9480b into adafruit:master Feb 22, 2019
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants