hci: add hci_is_le_identity_address_type

This commit is contained in:
Matthias Ringwald 2024-01-12 09:10:10 +01:00
parent bede2a55c2
commit 0890cf2b80
2 changed files with 16 additions and 0 deletions

View File

@ -616,6 +616,16 @@ bool hci_is_le_connection_type(bd_addr_type_t address_type){
}
}
bool hci_is_le_identity_address_type(bd_addr_type_t address_type){
switch (address_type){
case BD_ADDR_TYPE_LE_PUBLIC_IDENTITY:
case BD_ADDR_TYPE_LE_RANDOM_IDENTITY:
return true;
default:
return false;
}
}
static bool hci_is_le_connection(hci_connection_t * connection){
return hci_is_le_connection_type(connection->address_type);
}

View File

@ -1568,6 +1568,12 @@ bool hci_le_supported(void);
*/
bool hci_is_le_connection_type(bd_addr_type_t address_type);
/** @brief Check if address type corresponds to Identity Address
* @bparam address_type
* @erturn true if LE connection
*/
bool hci_is_le_identity_address_type(bd_addr_type_t address_type);
/* API_END */