1.21.9.4 GPIO_PortLatchRead Function
C
uint32_t GPIO_PortLatchRead ( GPIO_PORT port )
Summary
Read the latched value on all the I/O lines of the selected port.
Description
This function reads the latched data values on all the I/O lines of the selected port. Bit values returned in each position indicate corresponding pin levels.
-
1 - Pin is high.
-
0 - Pin is low.
Precondition
None.
Parameters
Param | Description |
---|---|
port | One of the IO ports from the enum GPIO_PORT |
Returns
Returns the latch register value of the specified I/O port
Example
uint32_t value; value = GPIO_PortLatchRead(GPIO_PORT_C);
Remarks
If the port has less than 32-bits, unimplemented pins will read as low (0). Implemented pins are Right aligned in the 32-bit return value.