move nRF51Gap::getInstance() into a cpp file.

Leaving it in the header was causing duplication of some static allocations.
This commit is contained in:
Rohit Grover 2015-05-28 15:19:22 +01:00
parent c1223374fd
commit 7c9ec1a3ff
2 changed files with 6 additions and 4 deletions

View file

@ -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

View file

@ -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);