USB-I2C/SPI/GPIO Interface Adapters
Published on USB-I2C/SPI/GPIO Interface Adapters (https://dlnware.com)

Home > C/C++ API > GPIO Interface > GPIO Interface Functions > DlnGpioPinPulldownEnable() Function

DlnGpioPinPulldownEnable() Function

The DlnGpioPinPulldownEnable() function activates an embedded pull-down resistor for the specified pin. For more information, read Pull-up/Pull-down Resistors [1].

Syntax
C/C++
DLN_RESULT DlnGpioPinPulldownEnable(
   HDLN handle, 
   uint16_t pin
);
Parameters
handle

A handle to the DLN-series adapter.

pin

The number of the pin that you want to configure.

Return Value
DLN_RES_SUCCESS

The function successfully activated the pull-down resistor.

DLN_RES_INVALID_PIN_NUMBER

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

DLN_RES_COMMAND_NOT_SUPPORTED

The DLN adapter does not support pull-down resistors.

Remarks
DLN-1 and DLN-2 adapters do not support pull-down resistors.

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


Links:
[1] http://dlnware.com/dll/Pull-Resistors
[2] http://dlnware.com/dll/DlnGpioGetPinCount