mirror of
https://github.com/esphome/esphome.git
synced 2025-09-15 01:32:19 +01:00
comments
This commit is contained in:
@@ -86,6 +86,8 @@ class BLEEvent {
|
|||||||
this->event_.gattc.gattc_if = i;
|
this->event_.gattc.gattc_if = i;
|
||||||
|
|
||||||
// Allocate external storage for param and data
|
// Allocate external storage for param and data
|
||||||
|
// External allocation is used because GATTC/GATTS events are rare (<1% of events)
|
||||||
|
// while GAP events (99%) are stored inline to minimize memory usage
|
||||||
this->event_.gattc.gattc_param = new esp_ble_gattc_cb_param_t(*p);
|
this->event_.gattc.gattc_param = new esp_ble_gattc_cb_param_t(*p);
|
||||||
|
|
||||||
// Copy data for events that need it
|
// Copy data for events that need it
|
||||||
@@ -113,6 +115,8 @@ class BLEEvent {
|
|||||||
this->event_.gatts.gatts_if = i;
|
this->event_.gatts.gatts_if = i;
|
||||||
|
|
||||||
// Allocate external storage for param and data
|
// Allocate external storage for param and data
|
||||||
|
// External allocation is used because GATTC/GATTS events are rare (<1% of events)
|
||||||
|
// while GAP events (99%) are stored inline to minimize memory usage
|
||||||
this->event_.gatts.gatts_param = new esp_ble_gatts_cb_param_t(*p);
|
this->event_.gatts.gatts_param = new esp_ble_gatts_cb_param_t(*p);
|
||||||
|
|
||||||
// Copy data for events that need it
|
// Copy data for events that need it
|
||||||
|
Reference in New Issue
Block a user