Skip to content
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

Direct Register Access for MCP23xxx #17

Open
gsexton opened this issue Aug 10, 2021 · 1 comment
Open

Direct Register Access for MCP23xxx #17

gsexton opened this issue Aug 10, 2021 · 1 comment

Comments

@gsexton
Copy link

gsexton commented Aug 10, 2021

What kind of new feature are you looking for?

I'm trying to figure out how to get direct access to the MCP23008 GPIO register using the MCP23xxx package. The only interface I see exposed is via pins. I'm writing a driver for the Adafruit I2c/SPI backpack, and it uses the MCP23008.

The need is because to send a character to the backpack you have to:

Set the reset pin on the GPIO
Write A value to pins 3-6 (data), and pin 2 low (enable)
Toggle Pin 2 High
Wait a period
Toggle Pin 2 Low
Write A value to pins 3-6 (data), and pin 2 low (enable)
Toggle Pin 2 High
Wait a period
Toggle Pin 2 Low

If I have to set each pin individually, that stacks up to a fair number of I2c transactions.

  • Hardware: MCP23008 (on Adafruit i2c/SPI backpack)
  • Software: Linux, Raspbian, I2C

Do you plan to:
If there's not a method, I could contribute a patch.

Thanks

George

@maruel
Copy link
Member

maruel commented Aug 15, 2021

I'm fine with a specific new method on the Dev struct. I wished I had to time to make a pure mechanism but still hasn't done that.

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

No branches or pull requests

2 participants