DLN_GET_PIN_CFG
DLN_GET_PIN_CFG Command
The DLN_GET_PIN_CFG command retrieves current configuration of the DLN-series adapter pin.
typedef struct
{
DLN_MSG_HEADER header;
uint16_t pin;
} __PACKED_ATTR DLN_GET_PIN_CFG_CMD;
Parameters:
- header
Defines the DLN message header DLN_MSG_HEADER. The header contains several predefined fields and is used to identify and route messages. When sending the command, a user must fill the following fields:
- size - The size of the message. Must be equal to the size of the DLN_GET_PIN_CFG structure.
- msgId - Defines the message. For the DLN_GET_PIN_CFG command it must be set to 0x0040. You can use the DLN_MSG_ID_GET_PIN_CFG constant.
- echoCounter - Can be used to link a command to a response. The response will have the same echoCounter value. This field can be any numerical value from 0 to 0xFFFF (65536).
- handle - A handle to the DLN-series adapter.
- pin
- A pin to get the configuration from.
DLN_GET_PIN_CFG Response
The adapter sends the DLN_GET_PIN_CFG response after the command execution. The response contains current configuration of the specified DLN-series adapter pin.
typedef struct
{
DLN_MSG_HEADER header;
DLN_RESULT result;
DLN_PIN_CFG cfg;
} __PACKED_ATTR DLN_GET_PIN_CFG_RSP;
Parameters:
- header
Defines the DLN message header DLN_MSG_HEADER. The response header contains the following fields:
- size - The size of the message. It is equal to the size of the DLN_GET_PIN_CFG_RSP structure.
- msgId - Defines the message. For the DLN_PIN_CFG response it is set to 0x0040. The DLN_MSG_ID_GET_PIN_CFG constant can be used.
- echoCounter - Links a command to a response. The echoCounter value is copied from the respective command header.
- handle - A handle to the DLN-series adapter.
- result
Contains the result of the command execution. The following values are available:
- DLN_RES_SUCCESS - the pin cfg was successfully retrieved.
- cfg
Contains the pin configuration DLN_PIN_CONFIG
If the pin is currently not in use, the module parameter will be set to 0x00 or DLN_MODULE_GENERIC while the role parameter will be set to DLN_PIN_ROLE_NOT_IN_USE
2006-2012