1.39.14.2 PORT_PinWrite Function

C

void PORT_PinWrite(PORT_PIN pin, bool value)

Summary

Writes the specified value to the selected pin.

Description

This function writes/drives the "value" on the selected I/O line/pin.

Precondition

The PORT_Initialize() function should have been called once.

Parameters

Param Description
pin One of the IO pins from the enum PORT_PIN.
value value to be written on the selected pin. - true = set pin to high (1). - false = clear pin to low (0).

Returns

None.

Example

bool value = true;
PORT_PinWrite(PORT_PIN_PB03, value);

Remarks

Calling this function with an input pin with the pull-up/pull-down feature enabled will affect the pull-up/pull-down configuration. If the value is false, the pull-down will be enabled. If the value is true, the pull-up will be enabled.