Вы здесь

DlnGpioPinGetCfg() Function

The DlnGpioPinGetCfg() function retrieves the current configuration of the specified GPIO pin.

Syntax
C/C++
DLN_RESULT DlnGpioPinGetCfg(
   HDLN handle,
   uint16_t pin, 
   DLN_GPIO_PIN_CONFIG* config
);
Parameters
handle

A handle to the DLN-series adapter.

pin

A number of the pin which configuration you want to know.

config

A pointer to the DLN_GPIO_PIN_CONFIG structure which is set to the configuration (after the function execution). This structure contains the following fields:

FieldDescription

cfg

A bit field that defines the pin configuration.

eventType

A type of the event.

eventPeriod

An interval for repeating events.

Return Value
DLN_RES_SUCCESS (0x00)

The function successfully retrieved the pin configuration.

DLN_RES_INVALID_HANDLE (0x8F)

The specified handle is not valid.

DLN_RES_CONNECTION_LOST (0xA0)

Connection to the DLN server was interrupted.

DLN_RES_INVALID_PIN_NUMBER (0xAB)

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

Remarks

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

Языки

Вход на сайт