High level Bluetooth Low Energy API and radio abstraction layer

Dependents:   BLE_ANCS_SDAPI BLE_temperature BLE_HeartRate BLE_ANCS_SDAPI_IRC ... more

Overview

The BLE_API is a high level abstraction for using Bluetooth Low Energy on multiple platforms. For details and examples using the BLE_API please see the BLE_API Summary Page. Or click on the API Documentation tab above.

Supported Services

Supported services can be found in the BLE_API/services folder.

Files at this revision

API Documentation at this revision

Comitter:
Vincent Coubard
Date:
Wed Sep 14 14:17:55 2016 +0100
Branch:
cd1b77dd31654b728a317d0ac7e9bc4e04b17468
Parent:
1201:9b71aac42d14
Child:
1204:87fd06ff4e3c
Commit message:
Sync with cd1b77dd31654b728a317d0ac7e9bc4e04b17468

2016-08-31 09:54:29+01:00: Vincent Coubard
Synchronize with ble folder in mbed-os 5.

Changed in this revision

source/BLE.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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);