Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Local variable 'gpio' shadows self.gpio #70

Closed
cefn opened this issue Jul 4, 2017 · 1 comment
Closed

Local variable 'gpio' shadows self.gpio #70

cefn opened this issue Jul 4, 2017 · 1 comment

Comments

@cefn
Copy link

cefn commented Jul 4, 2017

Should the implementation of MCP230xxBase#input_pins() be consistent with the local buffers (self.iodir, self.gppu) where the local copy of the self.gpio bytes should be the last known state?

Currently, in input_pins() when gpio is read, the resulting bytes are not stored to self.gpio but instead to a gpio variable with local scope, meaning the read may not have the side-effect of updating the MCP230xxBase object's knowledge of the current GPIO state as some may expect.

@cefn
Copy link
Author

cefn commented Feb 27, 2018

By the way, thanks for the library. Having remixed it for Micropython ( https://github.com/ShrimpingIt/micropython-mcp230xx ) your work enabled me to build this coin-driven MP3-player driven by a NodeMCU...
https://forum.micropython.org/viewtopic.php?t=4347

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant