Jump to main content

##

# 2.86.14 PORT_GroupClear Function

## C

    void PORT_GroupClear(PORT_GROUP group, uint32_t mask)

## Summary

Clears the selected IO pins of a group.

## Description

This function clears (drives a logic 0) on 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 clear. 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 driven to logic 0. 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_GroupClear(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.