17#include <zephyr/bluetooth/bluetooth.h>
24#define BT_ENOCEAN_SWITCH_OA BIT(0)
26#define BT_ENOCEAN_SWITCH_IA BIT(1)
28#define BT_ENOCEAN_SWITCH_OB BIT(2)
30#define BT_ENOCEAN_SWITCH_IB BIT(3)
33#define BT_ENOCEAN_SWITCH_O BT_ENOCEAN_SWITCH_OB
35#define BT_ENOCEAN_SWITCH_I BT_ENOCEAN_SWITCH_IB
82 const uint8_t *opt_data,
size_t opt_data_len);
99 const uint8_t *opt_data,
size_t opt_data_len);
void bt_enocean_decommission(struct bt_enocean_device *dev)
Forget an EnOcean device.
void(* bt_enocean_foreach_cb_t)(struct bt_enocean_device *dev, void *user_data)
Visitor callback for bt_enocean_foreach.
Definition enocean.h:141
void bt_enocean_commissioning_enable(void)
Enable automatic commissioning.
void bt_enocean_init(const struct bt_enocean_callbacks *cb)
Initialize the EnOcean subsystem.
void bt_enocean_commissioning_disable(void)
Disable automatic commissioning.
bt_enocean_button_action
Definition enocean.h:56
@ BT_ENOCEAN_BUTTON_PRESS
Definition enocean.h:58
@ BT_ENOCEAN_BUTTON_RELEASE
Definition enocean.h:57
uint32_t bt_enocean_foreach(bt_enocean_foreach_cb_t cb, void *user_data)
Call the given callback for each commissioned EnOcean device.
int bt_enocean_commission(const bt_addr_le_t *addr, const uint8_t key[16], uint32_t seq)
Manually commission an EnOcean device.
void(* loaded)(struct bt_enocean_device *device)
Callback for EnOcean devices being loaded from persistent storage.
Definition enocean.h:133
void(* 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.
Definition enocean.h:80
void(* commissioned)(struct bt_enocean_device *device)
Callback for EnOcean commissioning.
Definition enocean.h:114
void(* decommissioned)(struct bt_enocean_device *device)
Callback for EnOcean decommissioning.
Definition enocean.h:123
void(* sensor)(struct bt_enocean_device *device, const struct bt_enocean_sensor_data *data, const uint8_t *opt_data, size_t opt_data_len)
Callback for EnOcean Sensor reports.
Definition enocean.h:97
uint8_t key[16]
Definition enocean.h:52
int8_t rssi
Definition enocean.h:50
uint32_t seq
Definition enocean.h:48
bt_addr_le_t addr
Definition enocean.h:51
uint8_t flags
Definition enocean.h:49
bool * occupancy
Definition enocean.h:39
uint8_t * energy_lvl
Definition enocean.h:43
uint16_t * light_solar_cell
Definition enocean.h:42
uint16_t * light_sensor
Definition enocean.h:40
uint16_t * battery_voltage
Definition enocean.h:41