You are here

DlnGpioPinOpendrainIsEnabled() Function

The DlnGpioPinOpendrainIsEnabled() function informs whether the pin output is currently configured as push-pull or Open Drain.

Syntax
C/C++
DLN_RESULT DlnGpioPinOpendrainIsEnabled(
   HDLN handle,
   uint8_t pin,
   uint8_t* enabled
);
Parameters
handle

A handle to the DLN-series adapter.

pin

A number of the pin that you want to check.

enabled

A pointer to an unsigned 8-bit integer. After the function execution, this integer is set to the current pin configuration. The following values are available:

ValueDescription

1

The output is Open Drain.

0

The output is push-pull.

Return Value
DLN_RES_SUCCESS (0x00)

The function retrieved the open drain mode configuration 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
Most pins of DLN-1 and DLN-2 adapters do not support the Open Drain mode.

The DlnGpioPinOpendrainIsEnabled() function is declared in the dln_gpio.h file.

Contents

Languages

User login