When a GPIO port is programmed as an input,
reading it through the GPIO data register latches
either the inverted or non-inverted logic value
present at the GPIO pin. Writing to a GPIO port
that is programmed as an input has no effect.
When a GPIO port is programmed as an output,
the logic value or the inverted logic value that has
been written into the GPIO data register is output
to the GPIO pin. Reading from a GPIO port that is
programmed as an output returns the last value
written to the data register.
TABLE 56 - GPIO READ/WRITE BEHAVIOR
HOST OPERATION
GPIO INPUT PORT
GPIO OUTPUT PORT
READ
LATCHED VALUE OF GPIO PIN LAST WRITE TO GPIO DATA
REGISTER
WRITE
NO EFFECT
BIT PLACED IN GPIO DATA
REGISTER
128