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

REQ: ESP32 compability for the MCP23S08 #12

Open
rayholland opened this issue Apr 9, 2019 · 0 comments
Open

REQ: ESP32 compability for the MCP23S08 #12

rayholland opened this issue Apr 9, 2019 · 0 comments

Comments

@rayholland
Copy link

rayholland commented Apr 9, 2019

I managed to get the MCP23S08 lib working for a ESP32 (WEMOS LOLIN with OLED) but i have a problem:

When setting ALL pins as OUTPUTS (mcp.gpioPinMode(OUTPUT)), and set a specific PIN HIGH (mcp.gpioDigitalWrite(3, HIGH)) it works (result GP3 = HIGH).

BUT

When setting a specific pin as OUPUT (mcp.gpioPinMode(3, OUTPUT)) and set this specific PIN HIGH (mcp.gpioDigitalWrite(3, HIGH)) it does NOT work (result GP3 = LOW).

I think it has to do with this line in the lib code. Maybe something specific (BitWise) for AVR?:
mode == INPUT ? _gpioDirection |= (1 << pin) :_gpioDirection &= ~(1 << pin);

Any idea what would be wrong?

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

No branches or pull requests

1 participant