diff --git a/src/hci.c b/src/hci.c index 5f4129cb8..a9e067e09 100644 --- a/src/hci.c +++ b/src/hci.c @@ -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); } diff --git a/src/hci.h b/src/hci.h index 5ea684000..254f32665 100644 --- a/src/hci.h +++ b/src/hci.h @@ -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 */