mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-26 18:41:12 +00:00
sm: fix event format of SM_EVENT_IDENTITY_CREATED, fix SM_EVENT_IDENTITY_CREATED and SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
This commit is contained in:
parent
616878112b
commit
fccb5f315e
@ -694,11 +694,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[19];
|
||||
uint8_t event[20];
|
||||
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;
|
||||
little_endian_store_32(event, 18, index);
|
||||
sm_dispatch_event(HCI_EVENT_PACKET, 0, event, sizeof(event));
|
||||
}
|
||||
|
||||
|
@ -932,7 +932,7 @@ typedef uint8_t sm_key_t[16];
|
||||
/**
|
||||
* @brief Emitted during pairing to inform app about address used as identity
|
||||
*
|
||||
* @format H1B1B1
|
||||
* @format H1B1B2
|
||||
* @param handle
|
||||
* @param addr_type
|
||||
* @param address
|
||||
|
@ -2873,10 +2873,10 @@ static inline void sm_event_identity_created_get_identity_address(const uint8_t
|
||||
* @brief Get field index from event SM_EVENT_IDENTITY_CREATED
|
||||
* @param event packet
|
||||
* @return index
|
||||
* @note: btstack_type 1
|
||||
* @note: btstack_type 2
|
||||
*/
|
||||
static inline uint8_t sm_event_identity_created_get_index(const uint8_t * event){
|
||||
return event[18];
|
||||
static inline uint16_t sm_event_identity_created_get_index(const uint8_t * event){
|
||||
return little_endian_read_16(event, 18);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user