Вы здесь

DlnGpioPinIsEnabled() Function

The DlnGpioPinIsEnabled() function informs whether the GPIO module currently uses the pin.

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

A handle to a 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 one of the following values:

ValueDescription

1

The pin is configured as GPIO.

0

The pin is NOT configured as GPIO.

Return Value
DLN_RES_SUCCESS (0x00)

The function successfully retrieved the pin information.

DLN_RES_INVALID_PIN_NUMBER ( 0xAB)

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

Remarks

To connect the pin with the GPIO module, use the DlnGpioPinEnable() function. To disconnect the pin assigned to the GPIO module, call the DlnGpioPinDisable() function.

To check which module uses the pin, use the DlnGetPinCfg()function.

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

Языки

Вход на сайт