mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-10 19:05:11 +00:00
sm: provide le_device_db_index in SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED again
This commit is contained in:
parent
273591ab9d
commit
334126b319
@ -697,10 +697,11 @@ static void sm_notify_client_index(uint8_t type, hci_con_handle_t con_handle, ui
|
||||
int identity_address_type;
|
||||
le_device_db_info(index, &identity_address_type, identity_address, NULL);
|
||||
|
||||
uint8_t event[18];
|
||||
uint8_t event[19];
|
||||
sm_setup_event_base(event, sizeof(event), type, con_handle, addr_type, address);
|
||||
event[11] = identity_address_type;
|
||||
reverse_bd_addr(identity_address, &event[12]);
|
||||
event[18] = index;
|
||||
sm_dispatch_event(HCI_EVENT_PACKET, 0, event, sizeof(event));
|
||||
}
|
||||
|
||||
|
@ -833,14 +833,13 @@ typedef uint8_t sm_key_t[16];
|
||||
/**
|
||||
* @brief Identify resolving succeeded
|
||||
*
|
||||
* @format H1B1B
|
||||
* @format H1B1B2
|
||||
* @param handle
|
||||
* @param addr_type
|
||||
* @param address
|
||||
* @param identity_addr_type
|
||||
* @param identity_address
|
||||
*
|
||||
* @note le_device_db_index was removed, please use provided identity information directly
|
||||
* @param index_internal
|
||||
*
|
||||
*/
|
||||
#define SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 0xDA
|
||||
|
@ -2616,6 +2616,15 @@ static inline uint8_t sm_event_identity_resolving_succeeded_get_identity_addr_ty
|
||||
static inline void sm_event_identity_resolving_succeeded_get_identity_address(const uint8_t * event, bd_addr_t identity_address){
|
||||
reverse_bd_addr(&event[12], identity_address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field index_internal from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
|
||||
* @param event packet
|
||||
* @return index_internal
|
||||
* @note: btstack_type 2
|
||||
*/
|
||||
static inline uint16_t sm_event_identity_resolving_succeeded_get_index_internal(const uint8_t * event){
|
||||
return little_endian_read_16(event, 18);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_BLE
|
||||
|
Loading…
Reference in New Issue
Block a user