Goran Mahovlic / nRF51822_BLE_MIDI

Dependents:   BLE_MIDI

Fork of nRF51822 by Nordic Semiconductor

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Mon Jun 08 10:43:30 2015 +0100
Parent:
180:5082f66bb16e
Child:
182:711688a2ead8
Commit message:
Synchronized with git rev 7c9ec1a3
Author: Rohit Grover
move nRF51Gap::getInstance() into a cpp file.
Leaving it in the header was causing duplication of some static allocations.

Changed in this revision

nRF51Gap.cpp Show annotated file Show diff for this revision Revisions of this file
nRF51Gap.h Show annotated file Show diff for this revision Revisions of this file
--- a/nRF51Gap.cpp	Mon Jun 08 10:43:29 2015 +0100
+++ b/nRF51Gap.cpp	Mon Jun 08 10:43:30 2015 +0100
@@ -21,6 +21,11 @@
 #include "ble_advdata.h"
 #include "ble_hci.h"
 
+nRF51Gap &nRF51Gap::getInstance() {
+    static nRF51Gap m_instance;
+    return m_instance;
+}
+
 /**************************************************************************/
 /*!
     @brief  Sets the advertising parameters and payload for the device
--- a/nRF51Gap.h	Mon Jun 08 10:43:29 2015 +0100
+++ b/nRF51Gap.h	Mon Jun 08 10:43:30 2015 +0100
@@ -38,10 +38,7 @@
 class nRF51Gap : public Gap
 {
 public:
-    static nRF51Gap &getInstance() {
-        static nRF51Gap m_instance;
-        return m_instance;
-    }
+    static nRF51Gap &getInstance();
 
     /* Functions that must be implemented from Gap */
     virtual ble_error_t setAddress(AddressType_t  type,  const address_t address);