1.1.4.29 void GPIO_PropertySet( GPIO_PIN pin, GPIO_PROPERTY gpioProp, const uint32_t propMask ) Function

C

void GPIO_PropertySet( GPIO_PIN pin, GPIO_PROPERTY gpioProp, const uint32_t propMask )

Summary

Configures various parameters of the given GPIO pin

Description

This API lets the application configure various parameters of the given GPIO pin using a single API. The GPIO property to set is indicated by the gpioProp argument. The propMask argument contains the value to set for the corresponding property type. The propMask must be a shifted to the corresponding GPIO property bit position in the Pin Settings register.

Precondition

None

Parameters

Param Description
pin One of the values from the enum GPIO_PIN
gpioProp One of the values from the enum GPIO_PROPERTY
propMask A 32-bit mask value for the corresponding GPIO property

Returns

None

Example

// Set the pin function as GPIO
GPIO_PropertySet(GPIO_PIN_GPIO012, GPIO_PROP_MUX_SEL, GPIO_FUNCTION_GPIO);

// Set the pin direction as output
GPIO_PropertySet(GPIO_PIN_GPIO012, GPIO_PROP_DIR, GPIO_DIR_OUTPUT);

Remarks

None