https://developer.mbed.org/users/TheoHavercroft/code/nrf51-sdk/
Fork of nRF51822 by
Diff: source/nRF5xGattClient.cpp
- Revision:
- 566:e425ad9e5d6e
- Parent:
- 565:cf03471a4ec4
- Child:
- 567:e1800bd55a9e
diff -r cf03471a4ec4 -r e425ad9e5d6e source/nRF5xGattClient.cpp --- a/source/nRF5xGattClient.cpp Mon Jan 11 10:19:18 2016 +0000 +++ b/source/nRF5xGattClient.cpp Mon Jan 11 10:19:18 2016 +0000 @@ -16,6 +16,15 @@ #include "nRF5xGattClient.h" +nRF5xGattClient & +nRF5xGattClient::getInstance(void) { + static nRF5xGattClient* nRFGattClientSingleton = NULL; + if (nRFGattClientSingleton == NULL) { + nRFGattClientSingleton = new nRF5xGattClient(); + } + return *nRFGattClientSingleton; +} + #if !defined(TARGET_MCU_NRF51_16K_S110) && !defined(TARGET_MCU_NRF51_32K_S110) ble_error_t nRF5xGattClient::launchServiceDiscovery(Gap::Handle_t connectionHandle,