1.2.17.4 1.3.19.4 1.4.17.4 1.5.18.4 1.29.18.4 1.30.13.4 1.31.13.4 1.32.20.4 1.33.13.4 1.37.14.4 1.38.17.4 1.39.14.4 1.40.16.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.