Nordic stack and drivers for the mbed BLE API

Fork of nRF51822 by Nordic Semiconductor

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Fri May 08 15:33:54 2015 +0100
Parent:
123:e19f9f7874f9
Child:
125:35e4f65364bc
Commit message:
Synchronized with git rev 50391e73
Author: Rohit Grover
begin integration of device_manager by calling dm_init() from btle_init()

Changed in this revision

btle/btle.cpp Show annotated file Show diff for this revision Revisions of this file
nordic-sdk/components/ble/device_manager/device_manager.h Show annotated file Show diff for this revision Revisions of this file
--- a/btle/btle.cpp	Fri May 08 15:33:54 2015 +0100
+++ b/btle/btle.cpp	Fri May 08 15:33:54 2015 +0100
@@ -33,6 +33,7 @@
 #include "GapEvents.h"
 #include "nRF51Gap.h"
 #include "nRF51GattServer.h"
+#include "device_manager.h"
 
 #include "ble_hci.h"
 
@@ -91,6 +92,11 @@
 
     pstorage_init();
 
+    dm_init_param_t dm_init_param = {
+        .clear_persistent_data = false /* Set to true in case the module should clear all persistent data. */
+    };
+    dm_init(&dm_init_param);
+
     btle_gap_init();
 
     return ERROR_NONE;
--- a/nordic-sdk/components/ble/device_manager/device_manager.h	Fri May 08 15:33:54 2015 +0100
+++ b/nordic-sdk/components/ble/device_manager/device_manager.h	Fri May 08 15:33:54 2015 +0100
@@ -71,6 +71,10 @@
 #include "ble_gap.h"
 #include "device_manager_cnfg.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @defgroup dm_service_cntext_types Service/Protocol Types
  *
@@ -881,6 +885,10 @@
  */
 ret_code_t dm_handle_get(uint16_t conn_handle, dm_handle_t * p_handle);
 
+#ifdef __cplusplus
+}
+#endif
+
 /** @} */
 /** @} */
 /** @} */