1.31.13.15 PORT_GroupToggle Function

C

void PORT_GroupToggle(PORT_GROUP group, uint32_t mask)

Summary

Toggles the selected IO pins of a group.

Description

This function toggles the selected output pins of a group. The mask parameter control the pins to be updated. A mask bit position with a value 1 will cause that corresponding port pin to be toggled. A mask bit position with a value 0 will cause the corresponding port pin to stay unaffected.

Precondition

The PORT_Initialize() function should have been called.

Parameters

Param Description
group One of the IO ports from the enum PORT_GROUP.
mask A 32 bit value in which a bit represent a pin in the group. If the value of the bit is 1, the corresponding port pin will be toggled. If the value of the bit is 0. the corresponding port pin will stay unaffected.

Returns

None.

Example

// Clear PC5 and PC7 pins to 1
PORT_GroupToggle(PORT_GROUP_C, 0x00A0);

Remarks

If the port pin within the the group is not configured for output and has the pull feature enabled, driving a logic 0 on this pin will cause the pull down to be enabled. Driving a logic 1 on this pin will cause the pull up to be enabled.