btstack_event: add LE Device DB index to SM_EVENT_IDENTITY_CREATED

This commit is contained in:
Matthias Ringwald 2017-11-01 11:01:00 +01:00
parent 58d7a529a0
commit 6f8637a229
2 changed files with 15 additions and 5 deletions

View File

@ -883,7 +883,7 @@ typedef uint8_t sm_key_t[16];
* @param address
* @param identity_addr_type
* @param identity_address
* @param index_internal
* @param index
*
*/
#define SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 0xDA
@ -915,12 +915,13 @@ typedef uint8_t sm_key_t[16];
/**
* @brief Emitted during pairing to inform app about address used as identity
*
* @format H1B1B
* @format H1B1B1
* @param handle
* @param addr_type
* @param address
* @param identity_addr_type
* @param identity_address
* @param index
*/
#define SM_EVENT_IDENTITY_CREATED 0xDE

View File

@ -2711,12 +2711,12 @@ static inline void sm_event_identity_resolving_succeeded_get_identity_address(co
reverse_bd_addr(&event[12], identity_address);
}
/**
* @brief Get field index_internal from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
* @brief Get field index from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
* @param event packet
* @return index_internal
* @return index
* @note: btstack_type 2
*/
static inline uint16_t sm_event_identity_resolving_succeeded_get_index_internal(const uint8_t * event){
static inline uint16_t sm_event_identity_resolving_succeeded_get_index(const uint8_t * event){
return little_endian_read_16(event, 18);
}
#endif
@ -2857,6 +2857,15 @@ static inline uint8_t sm_event_identity_created_get_identity_addr_type(const uin
static inline void sm_event_identity_created_get_identity_address(const uint8_t * event, bd_addr_t identity_address){
reverse_bd_addr(&event[12], identity_address);
}
/**
* @brief Get field index from event SM_EVENT_IDENTITY_CREATED
* @param event packet
* @return index
* @note: btstack_type 1
*/
static inline uint8_t sm_event_identity_created_get_index(const uint8_t * event){
return event[18];
}
#endif
/**