Вы здесь

DlnGpioPinEnable() Function

The DlnGpioPinEnable() function connects a pin to the GPIO module.

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

A handle to a DLN-series adapter.

pin

A number of the pin that you want to configure.

Return Value
DLN_RES_SUCCESS (0x00)

The function successfully connected the pin to the GPIO module.

DLN_RES_INVALID_PIN_NUMBER (0xAB)

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

DLN_RES_PIN_IN_USE (0xA5)

Another module uses the pin and the GPIO module cannot use it. Use the DlnGetPinCfg()function to get the name of module using the pin.

Remarks

If you have not changed the configuration settings for the pin which you want to configure as a GPIO, it will have the default configuration. See Digital Input Events for details.

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

Языки

Вход на сайт