1.2.17.10 1.3.19.10 1.4.17.10 1.5.18.10 1.29.18.10 1.30.13.10 1.31.13.10 1.32.20.10 1.33.13.10 1.37.14.10 1.38.17.10 1.39.14.10 1.40.16.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.