7 #include <esp_gap_ble_api.h> 8 #include <esp_gattc_api.h> 9 #include <esp_gatts_api.h> 17 BLEEvent(esp_gap_ble_cb_event_t e, esp_ble_gap_cb_param_t *p) {
18 this->
event_.gap.gap_event = e;
19 memcpy(&this->
event_.gap.gap_param, p,
sizeof(esp_ble_gap_cb_param_t));
23 BLEEvent(esp_gattc_cb_event_t e, esp_gatt_if_t i, esp_ble_gattc_cb_param_t *p) {
24 this->
event_.gattc.gattc_event = e;
25 this->
event_.gattc.gattc_if = i;
26 memcpy(&this->
event_.gattc.gattc_param, p,
sizeof(esp_ble_gattc_cb_param_t));
29 case ESP_GATTC_NOTIFY_EVT:
30 this->
data.assign(p->notify.value, p->notify.value + p->notify.value_len);
31 this->
event_.gattc.gattc_param.notify.value = this->
data.data();
33 case ESP_GATTC_READ_CHAR_EVT:
34 case ESP_GATTC_READ_DESCR_EVT:
35 this->
data.assign(p->read.value, p->read.value + p->read.value_len);
36 this->
event_.gattc.gattc_param.read.value = this->
data.data();
44 BLEEvent(esp_gatts_cb_event_t e, esp_gatt_if_t i, esp_ble_gatts_cb_param_t *p) {
45 this->
event_.gatts.gatts_event = e;
46 this->
event_.gatts.gatts_if = i;
47 memcpy(&this->
event_.gatts.gatts_param, p,
sizeof(esp_ble_gatts_cb_param_t));
50 case ESP_GATTS_WRITE_EVT:
51 this->
data.assign(p->write.value, p->write.value + p->write.len);
52 this->
event_.gatts.gatts_param.write.value = this->
data.data();
82 std::vector<uint8_t>
data{};
esp_ble_gattc_cb_param_t gattc_param
esp_gap_ble_cb_event_t gap_event
struct esphome::esp32_ble::BLEEvent::@77::gap_event gap
struct esphome::esp32_ble::BLEEvent::@77::gattc_event gattc
BLEEvent(esp_gap_ble_cb_event_t e, esp_ble_gap_cb_param_t *p)
esp_ble_gatts_cb_param_t gatts_param
BLEEvent(esp_gatts_cb_event_t e, esp_gatt_if_t i, esp_ble_gatts_cb_param_t *p)
esp_gatts_cb_event_t gatts_event
esp_gattc_cb_event_t gattc_event
union esphome::esp32_ble::BLEEvent::@77 event_
esp_ble_gap_cb_param_t gap_param
enum esphome::esp32_ble::BLEEvent::ble_event_t type_
std::vector< uint8_t > data
Implementation of SPI Controller mode.
BLEEvent(esp_gattc_cb_event_t e, esp_gatt_if_t i, esp_ble_gattc_cb_param_t *p)
struct esphome::esp32_ble::BLEEvent::@77::gatts_event gatts