BAROS32/include/baros.h

38 lines
833 B
C
Raw Normal View History

2024-11-15 18:35:05 -05:00
#ifndef __BAROS_H__
#define __BAROS_H__
2024-12-02 00:57:17 -05:00
#include <stdint.h>
#include "esp_event_base.h"
2024-11-15 18:35:05 -05:00
#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
2024-12-02 00:57:17 -05:00
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;
uint8_t baros_ble_init(baros_ble_cfg_t *cfg);
ESP_EVENT_DECLARE_BASE(EVENT_BAROS_BLE);
typedef enum {
BAROS_BLE_DISC,
BAROS_BLE_CONNECT,
} baros_ble_event_t;
2024-11-15 18:35:05 -05:00
#endif