DlnGpioPinPullupIsEnabled() Function

The DlnGpioPinPullupIsEnabled() function informs whether an embedded pull-up resistor is currently enabled for the specified pin.

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

A handle to the DLN-series adapter.

pin

A number of the pin from which you want to retrieve information.

enabled

A pointer to an unsigned 8-bit integer. After the function execution, this integer is filled with current state of a pull-up resistor. The following values are available:

ValueDescription

1

The pull-up resistor is active.

0

The pull-up resistor is not active.

Return Value
DLN_RES_SUCCESS (0x00)

The function successfully retrieved the current state of the pull-up resistor.

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 pull-up resistors are active for GPIO pins. You can activate it manually by using the DlnGpioPinPullupEnable() function. To deactivate the Pull-up/Pull-down Resistors for GPIO pins, use the DlnGpioPinPullupDisable() function.

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