#ifndef __BAROS_H__ #define __BAROS_H__ #include #include "esp_event_base.h" #define BAROS_BLE_SERVICE_PUMP_ENABLED (0x4200) #define BAROS_BLE_SERVICE_PUMP_STATE (0x4300) #define BAROS_BLE_SERVICE_PUMP_DURATION (0x4350) #define BAROS_BLE_SERVICE_BARBACK (0x4400) #define BAROS_CHAR_POUR (BAROS_BLE_SERVICE_BARBACK + 1) // 0x4401 #define BAROS_CHAR_BUTTON (BAROS_BLE_SERVICE_BARBACK + 2) // 0x4402 typedef enum { BAROS_ROLE_BACK = 0, BAROS_ROLE_HEAD, BAROS_ROLE_ADMIN } baros_role_t; typedef struct { const char *name; baros_role_t role; } baros_ble_cfg_t; ESP_EVENT_DECLARE_BASE(EVENT_BAROS_BLE); typedef enum { BAROS_BLE_DISC, BAROS_BLE_CONNECT, } baros_ble_event_t; uint8_t baros_ble_init(baros_ble_cfg_t *cfg); int baros_ble_scan_start(); int baros_ble_scan_stop(); #endif