void bluetooth::shim::legacy::Acl::CreateLeConnection(
const bluetooth::hci::AddressWithType& address_with_type) {
- GetAclManager()->AddDeviceToConnectList(address_with_type);
GetAclManager()->CreateLeConnection(address_with_type);
LOG_DEBUG("Started Le device to connection %s",
address_with_type.ToString().c_str());
Stack::GetInstance()->GetAcl()->CreateClassicConnection(address);
}
-void bluetooth::shim::ACL_CreateLeConnection(const RawAddress& raw_address) {
- auto address_with_type = ToAddressWithType(raw_address, BLE_ADDR_RANDOM);
- Stack::GetInstance()->GetAcl()->CreateLeConnection(address_with_type);
+void bluetooth::shim::ACL_CreateLeConnection(
+ const tBLE_BD_ADDR& legacy_address_with_type) {
+ Stack::GetInstance()->GetAcl()->CreateLeConnection(
+ ToAddressWithTypeFromLegacy(legacy_address_with_type));
}
-void bluetooth::shim::ACL_CancelLeConnection(const RawAddress& raw_address) {
- auto address_with_type = ToAddressWithType(raw_address, BLE_ADDR_RANDOM);
- Stack::GetInstance()->GetAcl()->CancelLeConnection(address_with_type);
+void bluetooth::shim::ACL_CancelLeConnection(
+ const tBLE_BD_ADDR& legacy_address_with_type) {
+ Stack::GetInstance()->GetAcl()->CancelLeConnection(
+ ToAddressWithTypeFromLegacy(legacy_address_with_type));
}
void bluetooth::shim::ACL_WriteData(uint16_t handle, const BT_HDR* p_buf) {
namespace shim {
void ACL_CancelClassicConnection(const RawAddress& raw_address);
-void ACL_CancelLeConnection(const RawAddress& raw_address);
+void ACL_CancelLeConnection(const tBLE_BD_ADDR& legacy_address_with_type);
void ACL_CreateClassicConnection(const RawAddress& raw_address);
-void ACL_CreateLeConnection(const RawAddress& raw_address);
+void ACL_CreateLeConnection(const tBLE_BD_ADDR& legacy_address_with_type);
void ACL_WriteData(uint16_t handle, const BT_HDR* p_buf);
} // namespace shim
bool acl_create_le_connection_with_id(uint8_t id, const RawAddress& bd_addr) {
if (bluetooth::shim::is_gd_acl_enabled()) {
- bluetooth::shim::ACL_CreateLeConnection(bd_addr);
+ tBLE_BD_ADDR address_with_type{
+ .bda = bd_addr,
+ .type = BLE_ADDR_RANDOM,
+ };
+ bluetooth::shim::ACL_CreateLeConnection(address_with_type);
return true;
}
return connection_manager::direct_connect_add(id, bd_addr);
void acl_cancel_le_connection(const RawAddress& bd_addr) {
if (bluetooth::shim::is_gd_acl_enabled()) {
- return bluetooth::shim::ACL_CancelLeConnection(bd_addr);
+ tBLE_BD_ADDR address_with_type{
+ .bda = bd_addr,
+ .type = BLE_ADDR_RANDOM,
+ };
+ return bluetooth::shim::ACL_CancelLeConnection(address_with_type);
}
connection_manager::direct_connect_remove(CONN_MGR_ID_L2CAP, bd_addr);
}