3 #include "ble_characteristic.h" 10 #include <esp_bt_defs.h> 11 #include <esp_gap_ble_api.h> 12 #include <esp_gatt_defs.h> 13 #include <esp_gattc_api.h> 14 #include <esp_gatts_api.h> 17 namespace esp32_ble_server {
21 using namespace esp32_ble;
30 BLECharacteristic *create_characteristic(
const std::string &uuid, esp_gatt_char_prop_t properties);
31 BLECharacteristic *create_characteristic(uint16_t uuid, esp_gatt_char_prop_t properties);
42 void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param);
50 bool is_running() {
return this->running_state_ == RUNNING; }
51 bool is_starting() {
return this->running_state_ == STARTING; }
52 bool is_deleted() {
return this->init_state_ == DELETED; }
57 uint32_t created_characteristic_count_{0};
61 uint16_t handle_{0xFFFF};
63 bool advertise_{
false};
64 bool should_start_{
false};
66 bool do_create_characteristics_();
84 } running_state_{STOPPED};
BLECharacteristic * get_last_created_characteristic()
std::vector< BLECharacteristic * > characteristics_
Implementation of SPI Controller mode.