Updated

Fork of BLE_API by Bluetooth Low Energy

Revision:
875:25480c83e3cc
Parent:
874:0607a58418ce
Child:
879:4de7fb4da6ca
diff -r 0607a58418ce -r 25480c83e3cc source/BLE.cpp
--- a/source/BLE.cpp	Tue Nov 03 12:51:24 2015 +0000
+++ b/source/BLE.cpp	Tue Nov 03 12:51:24 2015 +0000
@@ -22,28 +22,8 @@
 #endif
 
 ble_error_t
-BLE::init(BLE::InitializationCompleteCallback_t initCompleteCallback)
+BLE::initImplementation(FunctionPointerWithContext<InitializationCompleteCallbackContext *> callback)
 {
-    FunctionPointerWithContext<InitializationCompleteCallbackContext *>callback(initCompleteCallback);
-    ble_error_t err = transport->init(instanceID, callback);
-    if (err != BLE_ERROR_NONE) {
-        return err;
-    }
-
-    /* Platforms enabled for DFU should introduce the DFU Service into
-     * applications automatically. */
-#if defined(TARGET_OTA_ENABLED)
-    static DFUService dfu(*this); // defined static so that the object remains alive
-#endif // TARGET_OTA_ENABLED
-
-    return BLE_ERROR_NONE;
-}
-
-template <typename T>
-ble_error_t
-BLE::init(T *object, void (T::*initCompleteCallback)(InitializationCompleteCallbackContext *))
-{
-    FunctionPointerWithContext<InitializationCompleteCallbackContext *>callback(object, initCompleteCallback);
     ble_error_t err = transport->init(instanceID, callback);
     if (err != BLE_ERROR_NONE) {
         return err;