feat(ble/bluedroid): Include SMP state in BLE status reporting

(cherry picked from commit de9a367f13)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
This commit is contained in:
Zhang Hai Peng
2025-06-04 17:13:32 +08:00
parent 8ef869122d
commit 504818372c
2 changed files with 8 additions and 0 deletions

View File

@ -216,5 +216,12 @@ uint32_t btc_get_ble_status(void)
} }
#endif #endif
#if SMP_INCLUDED == TRUE
extern uint8_t smp_get_state(void);
if (smp_get_state()) {
status |= BIT(BTC_BLE_STATUS_SMP_STATE);
}
#endif
return status; return status;
} }

View File

@ -41,6 +41,7 @@ typedef enum {
BTC_BLE_STATUS_GATTS_SRVC, // GATTS service exist BTC_BLE_STATUS_GATTS_SRVC, // GATTS service exist
BTC_BLE_STATUS_PRIVACY, // Privacy enabled BTC_BLE_STATUS_PRIVACY, // Privacy enabled
BTC_BLE_STATUS_ADDR_RESOLVE_DISABLE,// Address resolution disable status BTC_BLE_STATUS_ADDR_RESOLVE_DISABLE,// Address resolution disable status
BTC_BLE_STATUS_SMP_STATE, // SMP state machine
} tBTC_BLE_STATUS; } tBTC_BLE_STATUS;
future_t **btc_main_get_future_p(btc_main_future_type_t type); future_t **btc_main_get_future_p(btc_main_future_type_t type);