2.49.19 GPIO_PinDirConfig Function

C

void GPIO_PinDirConfig(GPIO_PIN pin, GPIO_DIR dir)

Summary

Sets the direction of the given GPIO Pin.

Description

Based on the GPIO_DIR enum value, sets the direction of the given GPIO_PIN

Precondition

None.

Parameters

ParamDescription
pinOne of the GPIO pins from the enum GPIO_PIN
dirOne of the values from the enum GPIO_DIR

Returns

None

Example

// Set the direction of GPIO_PIN_GPIO012 to output
GPIO_PinDirConfig(GPIO_PIN_GPIO012, GPIO_DIR_OUTPUT);

Remarks

None