From 8ef5e35b131e5ecd1ab4d1be4f36020762ac5ec6 Mon Sep 17 00:00:00 2001 From: Vishwanath Martur <64204611+vishwamartur@users.noreply.github.com> Date: Sat, 2 Nov 2024 12:56:53 +0530 Subject: [PATCH] Fix BLE API include directive issue with CY8CKIT-062-BLE Related to #15483 Implement the `createBLEInstance()` function in `connectivity/FEATURE_BLE/source/cordio/source/BLEInstanceBaseImpl.cpp`. * Return a valid `BLEInstanceBase` object from the `createBLEInstance()` function. * Ensure the `createBLEInstance()` function is correctly linked and resolves the undefined reference error. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/ARMmbed/mbed-os/issues/15483?shareId=XXXX-XXXX-XXXX-XXXX). --- .../source/cordio/source/BLEInstanceBaseImpl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/connectivity/FEATURE_BLE/source/cordio/source/BLEInstanceBaseImpl.cpp b/connectivity/FEATURE_BLE/source/cordio/source/BLEInstanceBaseImpl.cpp index abe30f20809..b8d1e7e1ef8 100644 --- a/connectivity/FEATURE_BLE/source/cordio/source/BLEInstanceBaseImpl.cpp +++ b/connectivity/FEATURE_BLE/source/cordio/source/BLEInstanceBaseImpl.cpp @@ -773,3 +773,9 @@ FunctionPointerWithContext<::BLE::InitializationCompleteCallbackContext *> BLEIn } // namespace impl } // namespace ble + +// Implement the createBLEInstance() function to return a valid BLEInstanceBase object +ble::BLEInstanceBase *ble::createBLEInstance() +{ + return (&(ble::impl::BLEInstanceBase::deviceInstance())); +}