Detecting pin state
changes: The IO expander utilizes an interrupt to notify the controller
to request a read if an input pin changes state. The IO expander also updates
the locally saved pin state any time a GPIO pin observes a rising or falling
edge.
Changing GPIO direction:
Because MSPM0 can enable GPIO input and output at the same time, GPIO input is
always enabled. Direction bytes are set to enable or disable GPIO output. The
bit position within each byte determines output control. This allows for all
pins to use the rising and falling edge interrupt and the ability to read all
pin states.