Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of nRF51822 by
Diff: source/nRF5xn.h
- Revision:
- 458:b42881afcc6e
- Parent:
- 388:db85a09c27ef
- Child:
- 463:b869f947a37a
--- a/source/nRF5xn.h Mon Nov 02 09:05:11 2015 +0000 +++ b/source/nRF5xn.h Mon Nov 02 09:05:11 2015 +0000 @@ -17,13 +17,15 @@ #ifndef __NRF51822_H__ #define __NRF51822_H__ -#include "mbed.h" +#include "ble/BLE.h" #include "ble/blecommon.h" -#include "ble/BLE.h" +#include "ble/BLEInstanceBase.h" + #include "nRF5xGap.h" #include "nRF5xGattServer.h" #include "nRF5xGattClient.h" #include "nRF5xSecurityManager.h" + #include "btle.h" class nRF5xn : public BLEInstanceBase @@ -32,7 +34,10 @@ nRF5xn(void); virtual ~nRF5xn(void); - virtual ble_error_t init(void); + virtual ble_error_t init(BLE::InstanceID_t instanceID, BLE::InitializationCompleteCallback_t); + virtual bool hasInitialized(void) const { + return initialized; + } virtual ble_error_t shutdown(void); virtual const char *getVersion(void); @@ -58,6 +63,10 @@ return nRF5xSecurityManager::getInstance(); } virtual void waitForEvent(void); + +private: + bool initialized; + BLE::InstanceID_t instanceID; }; #endif \ No newline at end of file