nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ button

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.

Parameters
deviceEnOcean device generating the message.
actionButton action type.
changedBitfield of buttons affected by the action.
opt_dataOptional data array from the message, or NULL.
opt_data_lenLength of the optional data.