For with fix for disconnection notifications

Fork of nRF51822 by Nordic Semiconductor

Files at this revision

API Documentation at this revision

Comitter:
Rohit Grover
Date:
Fri May 23 09:01:52 2014 +0100
Parent:
3:791d672cbbec
Child:
5:b11766b636aa
Commit message:
nRF51822n now has a different base class; it extends BLEDeviceInstanceBase

Changed in this revision

nRF51822n.cpp Show annotated file Show diff for this revision Revisions of this file
nRF51822n.h Show annotated file Show diff for this revision Revisions of this file
--- a/nRF51822n.cpp	Thu May 22 15:03:55 2014 +0100
+++ b/nRF51822n.cpp	Fri May 23 09:01:52 2014 +0100
@@ -19,6 +19,20 @@
 
 #include "btle/btle.h"
 
+/**
+ * The singleton which represents the nRF51822 transport for the BLEDevice.
+ */
+static nRF51822n deviceInstance;
+
+/**
+ * BLE-API requires an implementation of the following function in order to
+ * obtain its transport handle.
+ */
+BLEDeviceInstanceBase *
+createBLEDeviceInstance(void) {
+    return (&deviceInstance);
+}
+
 /**************************************************************************/
 /*!
     @brief  Constructor
--- a/nRF51822n.h	Thu May 22 15:03:55 2014 +0100
+++ b/nRF51822n.h	Fri May 23 09:01:52 2014 +0100
@@ -34,7 +34,7 @@
 
 */
 /**************************************************************************/
-class nRF51822n : public BLEDevice
+class nRF51822n : public BLEDeviceInstanceBase
 {
     public:
         nRF51822n(void);