Skip to content

Commit

Permalink
modules/bluetooth: Support BLE only device
Browse files Browse the repository at this point in the history
Except enable, bt_hal_common_ops is not used for BLE only device.
So, allow to not register BT hal operation functions.
  • Loading branch information
SPRESENSE committed Jul 21, 2022
1 parent 8d4e6b4 commit 42be297
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions sdk/modules/bluetooth/bluetooth_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,6 @@ int bt_init(void)
{
ret = bt_hal_common_ops->init();
}
else
{
_err("%s [BT][Common] Initialization failed(HAL not registered).\n", __func__);
return BT_FAIL;
}

return ret;
}
Expand All @@ -350,11 +345,6 @@ int bt_finalize(void)
{
ret = bt_hal_common_ops->finalize();
}
else
{
_err("%s [BT][Common] Connect failed(HAL not registered).\n", __func__);
return BT_FAIL;
}

return ret;
}
Expand Down Expand Up @@ -500,21 +490,11 @@ int bt_enable(void)
{
ret = bt_hal_common_ops->setDevAddr(&g_bt_common_state.bt_addr);
}
else
{
_err("%s [BT][Common] Set local address failed(HAL not registered).\n", __func__);
return BT_FAIL;
}

if (bt_hal_common_ops && bt_hal_common_ops->setDevName)
{
ret = bt_hal_common_ops->setDevName(g_bt_common_state.bt_name);
}
else
{
_err("%s [BT][Common] Set local name failed(HAL not registered).\n", __func__);
return BT_FAIL;
}

return ret;
}
Expand Down

0 comments on commit 42be297

Please sign in to comment.