A bit field that defines the configuration parameters that you want to update. Each of the 16 bits of validFields
corresponds to a specific parameter in the DLN_GPIO_PIN_CONFIG structure. If you set the bit to 1, the new configuration parameter will be applied. If you set the bit to 0, the configuration parameter will remain unchanged regardless of its value in the DLN_GPIO_PIN_CONFIG structure. You can also configure the pin parameters, using the constants declared in the dln_gpio.h
file. If several constants are used, separate them with "| " (binary "or").Several bits are reserved for future use and must be set to 0.
Bits | Corresponds to | Constant |
|
Bit 0 of DLN_GPIO_PIN_CONFIG::cfg
| |
|
Bit 1 of DLN_GPIO_PIN_CONFIG::cfg
| |
|
Bit 2 of DLN_GPIO_PIN_CONFIG::cfg
| |
|
Bit 3 of DLN_GPIO_PIN_CONFIG::cfg
| |
|
Bit 4 of DLN_GPIO_PIN_CONFIG::cfg
| |
|
Bit 5 of DLN_GPIO_PIN_CONFIG::cfg
| |
| | |
| | |
|
DLN_GPIO_PIN_CONFIG::eventType
| |
|
DLN_GPIO_PIN_CONFIG::eventPeriod
|
DLN_GPIO_EVENT_PERIOD_BIT
|
| | |
| | |
| | |
| | |
| | |
| | |
In order to include a configuration field in the operation, set the corresponding bit to 1. If you set a bit to 0, the field will be ignored.For example, if you only need to change the isOutput
and eventType
settings, the validFields
byte should look like this: 0000000100000010.You can configure the pin by using the constants declared in the dln_gpio.h
file. In this case, the validFields
byte should look like this:
- C/C++
validFields
= DLN_GPIO_OUTPUT_BIT | DLN_GPIO_EVENT_TYPE_BIT;