mirror of
https://github.com/esphome/esphome.git
synced 2025-10-05 03:13:49 +01:00
dry
This commit is contained in:
@@ -103,6 +103,10 @@ class BLEEvent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Type definitions for cleaner method signatures
|
// Type definitions for cleaner method signatures
|
||||||
|
struct StatusOnlyData {
|
||||||
|
esp_bt_status_t status;
|
||||||
|
};
|
||||||
|
|
||||||
struct RSSICompleteData {
|
struct RSSICompleteData {
|
||||||
esp_bt_status_t status;
|
esp_bt_status_t status;
|
||||||
int8_t rssi;
|
int8_t rssi;
|
||||||
@@ -193,14 +197,11 @@ class BLEEvent {
|
|||||||
// This matches ESP-IDF's scan complete event structures
|
// This matches ESP-IDF's scan complete event structures
|
||||||
// All three (scan_param_cmpl, scan_start_cmpl, scan_stop_cmpl) have identical layout
|
// All three (scan_param_cmpl, scan_start_cmpl, scan_stop_cmpl) have identical layout
|
||||||
// Used by: esp32_ble_tracker
|
// Used by: esp32_ble_tracker
|
||||||
struct {
|
StatusOnlyData scan_complete; // 1 byte
|
||||||
esp_bt_status_t status;
|
|
||||||
} scan_complete; // 1 byte
|
|
||||||
// Advertising complete events all have same structure
|
// Advertising complete events all have same structure
|
||||||
// Used by: esp32_ble_beacon, esp32_ble server components
|
// Used by: esp32_ble_beacon, esp32_ble server components
|
||||||
struct {
|
StatusOnlyData
|
||||||
esp_bt_status_t status;
|
adv_complete; // 1 byte - for ADV_DATA_SET, SCAN_RSP_DATA_SET, ADV_DATA_RAW_SET, ADV_START, ADV_STOP
|
||||||
} adv_complete; // 1 byte - for ADV_DATA_SET, SCAN_RSP_DATA_SET, ADV_DATA_RAW_SET, ADV_START, ADV_STOP
|
|
||||||
// RSSI complete event
|
// RSSI complete event
|
||||||
// Used by: ble_client (ble_rssi_sensor component)
|
// Used by: ble_client (ble_rssi_sensor component)
|
||||||
RSSICompleteData read_rssi_complete; // 8 bytes
|
RSSICompleteData read_rssi_complete; // 8 bytes
|
||||||
|
Reference in New Issue
Block a user