Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
Diff: source/BLE.cpp
- Branch:
- cd1b77dd31654b728a317d0ac7e9bc4e04b17468
- Revision:
- 1203:d4f1ef46d97b
- Parent:
- 1201:9b71aac42d14
diff -r 9b71aac42d14 -r d4f1ef46d97b source/BLE.cpp
--- a/source/BLE.cpp Wed Sep 14 14:17:52 2016 +0100
+++ b/source/BLE.cpp Wed Sep 14 14:17:55 2016 +0100
@@ -25,6 +25,11 @@
#include <minar/minar.h>
#endif
+#if !defined(YOTTA_CFG_MBED_OS)
+#include <mbed_error.h>
+#include <toolchain.h>
+#endif
+
ble_error_t
BLE::initImplementation(FunctionPointerWithContext<InitializationCompleteCallbackContext*> callback)
{
@@ -82,6 +87,20 @@
* This may be overridden.
*/
#define INITIALIZER_LIST_FOR_INSTANCE_CONSTRUCTORS createBLEInstance
+
+// yotta unlike mbed-cli has proper dependency mechanisms
+// It is not required to defined a stub for createBLEInstance
+#if !defined(YOTTA_CFG_MBED_OS)
+
+// this stub is required by ARMCC otherwise link will systematically fail
+MBED_WEAK BLEInstanceBase* createBLEInstance() {
+ error("Please provide an implementation for mbed BLE");
+ return NULL;
+}
+
+#endif
+
+
#endif /* YOTTA_CFG_BLE_INSTANCES_COUNT */
typedef BLEInstanceBase *(*InstanceConstructor_t)(void);
