1.27.11.4 PIO_PortLatchRead Function

C

uint32_t PIO_PortLatchRead ( PIO_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 PIO_PORT

Returns

Returns the data driven on all the I/O lines of the selected port.

Example

uint32_t value;
value = PIO_PortLatchRead(PIO_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.