DlnGpioPinOpendrainEnable() Function

The DlnGpioPinOpendrainEnable() function enables Open Drain Mode for the specified pin.

Syntax
C/C++
DLN_RESULT DlnGpioPinOpendrainEnable(
   HDLN handle,
   uint8_t pin
);
Parameters
handle

A handle to the DLN-series adapter.

pin

A number of the pin that you want to configure.

Return Value
DLN_RES_SUCCESS (0x00)

The function enabled the open drain mode successfully.

DLN_RES_INVALID_PIN_NUMBER (0xAB)

The pin number is not valid. Use the DlnGpioGetPinCount() function to find the maximum possible pin number.

Remarks

By default, the Open Drain Mode is disabled for all GPIO pins. The DlnGpioPinOpendrainEnable() function enables the Open Drain Mode for the specified pin. If the pin is not assigned to the GPIO module, this configuration will be saved in the internal memory. When you assign the pin to the GPIO module, the saved configuration will be applied.

DLN-1 and DLN-2 adapters do not support the Open Drain mode.

The DlnGpioPinOpendrainEnable() function is defined in the dln_gpio.h file.