[esp32_ble] Group the one byte io_cap_ with the other byte fields (#20136)

This commit is contained in:
J. Nick Koston
2026-10-05 12:05:15 +13:00
committed by GitHub
parent 0dc10d9f30
commit 8f0e032b5e
+3 -3
View File
@@ -235,14 +235,14 @@ class ESP32BLE final : public Component {
#ifdef USE_ESP32_BLE_ADVERTISING
BLEAdvertising *advertising_{}; // 4 bytes (pointer)
#endif
const char *name_{nullptr}; // 4 bytes (pointer to string literal in flash)
esp_ble_io_cap_t io_cap_{ESP_IO_CAP_NONE}; // 4 bytes (enum)
uint32_t advertising_cycle_time_{}; // 4 bytes
const char *name_{nullptr}; // 4 bytes (pointer to string literal in flash)
uint32_t advertising_cycle_time_{}; // 4 bytes
// 2-byte aligned members
uint16_t appearance_{0}; // 2 bytes
// 1-byte aligned members (grouped together to minimize padding)
esp_ble_io_cap_t io_cap_{ESP_IO_CAP_NONE}; // 1 byte (uint8_t typedef)
BLEComponentState state_{BLE_COMPONENT_STATE_OFF}; // 1 byte (uint8_t enum)
bool enable_on_boot_{}; // 1 byte
#ifdef USE_ESP32_BLE_ADVERTISING