move GattServer::getInstance() into a .cpp file.
Leaving it in the header was causing duplication of some static memory.master
parent
a440201b9c
commit
c1223374fd
|
@ -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
|
||||
|
|
|
@ -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 &);
|
||||
|
|
Loading…
Reference in New Issue