nRF Connect SDK API 0.1.0
|
void(* bt_enocean_callbacks::button) (struct bt_enocean_device *device, enum bt_enocean_button_action action, uint8_t changed, const uint8_t *opt_data, size_t opt_data_len) |
Callback for EnOcean Switch button presses.
This callback is called for every new button message from a commissioned EnOcean Switch. The set of changed button states on the switch is represented as a bitfield, with 4 bits representing the individual buttons.
See the BT_ENOCEAN_SWITCH_*
defines for button mapping. Note that the single rocker switches only engages the third and fourth buttons.
device | EnOcean device generating the message. |
action | Button action type. |
changed | Bitfield of buttons affected by the action. |
opt_data | Optional data array from the message, or NULL. |
opt_data_len | Length of the optional data. |