Вы здесь

DlnGpioPinPullupEnable() Function

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

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

A handle to the DLN-series adapter.

pin

A number of the pin for which you want to enable a pull-up resistor.

Return Value
DLN_RES_SUCCESS (0x00)

The function activated the pull-up resistor 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 pull-up resistors are active for GPIO pins. You can change this configuration by using the DlnGpioPinPullupDisable() function. To check the current configuration setting for a pin, use the DlnGpioPinPullupIsEnabled() function.

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

Языки

Вход на сайт