1.33.13.4 PORT_PinLatchRead Function

C

bool PORT_PinLatchRead(PORT_PIN pin)

Summary

Read the value driven on the selected pin.

Description

This function reads the data driven on the selected I/O line/pin. The function does not sample the state of the hardware pin. It only returns the value that is written to output register. Refer to the PORT_PinRead() function if the state of the output pin needs to be read.

Precondition

The PORT_Initialize() function should have been called.

Parameters

Param Description
pin One of the IO pins from the enum PORT_PIN.

Returns

- true - the present value in the output latch is a logic high.

- false - the present value in the output latch is a logic low.

Example

bool value;
value = PORT_PinLatchRead(PORT_PIN_PB03);

Remarks

To read actual pin value, PIN_Read API should be used.