Compatible with Keewi v1
Fork of BLE_API by
Revision 73:eeb1ac3545e9, committed 2014-06-06
- Comitter:
- Rohit Grover
- Date:
- Fri Jun 06 11:17:37 2014 +0100
- Parent:
- 72:bd485a3b18c5
- Child:
- 74:301042c34cb8
- Commit message:
- add support for accessing GAP's state
Changed in this revision
hw/BLEDevice.h | Show annotated file Show diff for this revision Revisions of this file |
hw/Gap.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/hw/BLEDevice.h Fri Jun 06 11:08:32 2014 +0100 +++ b/hw/BLEDevice.h Fri Jun 06 11:17:37 2014 +0100 @@ -143,6 +143,8 @@ ble_error_t addService(GattService &service); + Gap::GapState_t getGapState(void) const; + private: /** * Internal helper to udpate the transport backend with advertising data @@ -338,6 +340,11 @@ return transport->getGattServer().addService(service); } +inline Gap::GapState_t +BLEDevice::getGapState(void) const { + return transport->getGap().getState(); +} + /* * ALL OF THE FOLLOWING METHODS ARE DEPRECATED */
--- a/hw/Gap.h Fri Jun 06 11:08:32 2014 +0100 +++ b/hw/Gap.h Fri Jun 06 11:17:37 2014 +0100 @@ -90,6 +90,10 @@ } } + GapState_t getState(void) const { + return state; + } + protected: Gap() : state(),