Skip to content

Commit 4d48965

Browse files
committed
Merge branch 'feat/get_ble_resolve_address_status_opt' into 'master'
feat(ble/bluedroid): Optimized address resolution status for internal usage Closes BLERP-1054 See merge request espressif/esp-idf!33851
2 parents a63b847 + 5486241 commit 4d48965

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

components/bt/host/bluedroid/btc/core/btc_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ uint32_t btc_get_ble_status(void)
142142
}
143143

144144
// Address resolve status
145-
extern uint8_t btm_get_ble_addr_resolve_status(void);
146-
if (btm_get_ble_addr_resolve_status()) {
147-
status |= BIT(BTC_BLE_STATUS_ADDR_RESOLVE);
145+
extern uint8_t btm_get_ble_addr_resolve_disable_status(void);
146+
if (btm_get_ble_addr_resolve_disable_status()) {
147+
status |= BIT(BTC_BLE_STATUS_ADDR_RESOLVE_DISABLE);
148148
}
149149

150150
#if (SMP_INCLUDED == TRUE)

components/bt/host/bluedroid/btc/include/btc/btc_main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ typedef enum {
4040
BTC_BLE_STATUS_GATTC_APP, // GATTC application exist
4141
BTC_BLE_STATUS_GATTS_SRVC, // GATTS service exist
4242
BTC_BLE_STATUS_PRIVACY, // Privacy enabled
43-
BTC_BLE_STATUS_ADDR_RESOLVE,// Address resolution status
43+
BTC_BLE_STATUS_ADDR_RESOLVE_DISABLE,// Address resolution disable status
4444
} tBTC_BLE_STATUS;
4545

4646
future_t **btc_main_get_future_p(btc_main_future_type_t type);

components/bt/host/bluedroid/stack/btm/btm_main.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,11 @@ uint8_t btm_acl_active_count(void)
135135
return count;
136136
}
137137
#if (BLE_INCLUDED == TRUE)
138-
// address resolution status
139-
uint8_t btm_get_ble_addr_resolve_status(void)
138+
// Address resolution status
139+
uint8_t btm_get_ble_addr_resolve_disable_status(void)
140140
{
141-
return (uint8_t) btm_cb.addr_res_en;
141+
// Returns false if address resolution is enabled, true if disabled
142+
return (btm_cb.addr_res_en) ? 0 : 1;
142143
}
143144

144145
void btm_ble_addr_resolve_enable(bool enable)

0 commit comments

Comments
 (0)