1.37.14.10 PORT_GroupRead Function

C

uint32_t PORT_GroupRead(PORT_GROUP group)

Summary

Read all the I/O pins in the specified port group.

Description

The function reads the hardware pin state of all pins in the specified group and returns this as a 32 bit value. Each bit in the 32 bit value represent a pin. For example, bit 0 in group 0 will represent pin PA0. Bit 1 will represent PA1 and so on. The application should only consider the value of the port group pins which are implemented on the device.

Precondition

The PORT_Initialize() function should have been called. Input buffer (INEN bit in the Pin Configuration register) should be enabled in MHC.

Parameters

Param Description
group One of the IO groups from the enum PORT_GROUP.

Returns

A 32-bit value representing the hardware state of of all the I/O pins in the selected port group.

Example

uint32_t value;
value = PORT_Read(PORT_GROUP_C);

Remarks

None.