shunpei kataoka / nRF51822

Fork of nRF51822 by Shuta Nakamae

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Mon Jun 08 10:43:29 2015 +0100
Parent:
179:10e4c13360d9
Child:
181:ce044982b915
Commit message:
Synchronized with git rev c1223374
Author: Rohit Grover
move GattServer::getInstance() into a .cpp file.
Leaving it in the header was causing duplication of some static memory.

Changed in this revision

nRF51GattServer.cpp Show annotated file Show diff for this revision Revisions of this file
nRF51GattServer.h Show annotated file Show diff for this revision Revisions of this file
--- a/nRF51GattServer.cpp	Mon Jun 08 10:43:29 2015 +0100
+++ b/nRF51GattServer.cpp	Mon Jun 08 10:43:29 2015 +0100
@@ -22,6 +22,11 @@
 
 #include "nRF51Gap.h"
 
+nRF51GattServer &nRF51GattServer::getInstance(void) {
+    static nRF51GattServer m_instance;
+    return m_instance;
+}
+
 /**************************************************************************/
 /*!
     @brief  Adds a new service to the GATT table on the peripheral
--- a/nRF51GattServer.h	Mon Jun 08 10:43:29 2015 +0100
+++ b/nRF51GattServer.h	Mon Jun 08 10:43:29 2015 +0100
@@ -27,10 +27,7 @@
 class nRF51GattServer : public GattServer
 {
 public:
-    static nRF51GattServer &getInstance() {
-        static nRF51GattServer m_instance;
-        return m_instance;
-    }
+    static nRF51GattServer &getInstance();
 
     /* Functions that must be implemented from GattServer */
     virtual ble_error_t addService(GattService &);