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);
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?