I am using a mcp23017 to read button presses for my joystick project and am using the internal pullup to minimize complications. Is there a way to invert all the bits in the uint16_t so i can send the values as normally off?
I'm using this Adafruit library.
And the reading code:
uint16_t buttons = mcp.readGPIOAB();