Release 0.2.7

=============

API enhancements to support purging of GATT/GAP state.

Enhancements
~~~~~~~~~~~~

* Add API BLEDevice::shutdown() to purge the BLE stack of GATT and GAP state.
  BLEDevice::init() should be called before restoring state.

* Minor update to API for GattCharacterisitc: add getValueHandle() as a
  shortcut for getValueAttribute().getHandle().

Bugfixes
~~~~~~~~

Compatibility
~~~~~~~~~~~~~

This release is backward compatible with 0.2.4.
This commit is contained in:
Rohit Grover 2014-12-03 11:55:39 +00:00
commit 61cff47899
2 changed files with 13 additions and 0 deletions

View file

@ -28,6 +28,7 @@ public:
virtual Gap& getGap() = 0;
virtual GattServer& getGattServer() = 0;
virtual ble_error_t init(void) = 0;
virtual ble_error_t shutdown(void) = 0;
virtual ble_error_t reset(void) = 0;
virtual ble_error_t setTxPower(int8_t txPower) = 0;
virtual void waitForEvent(void) = 0;

View file

@ -36,6 +36,11 @@ public:
ble_error_t init();
ble_error_t reset(void);
/**
* Purge the BLE stack of GATT and GAP state. init() must be called afterwards to re-instate services and GAP state.
*/
ble_error_t shutdown(void);
/* GAP specific APIs */
public:
/**
@ -364,6 +369,13 @@ BLEDevice::reset(void)
return transport->reset();
}
inline ble_error_t
BLEDevice::shutdown(void)
{
clearAdvertisingPayload();
return transport->shutdown();
}
inline ble_error_t
BLEDevice::setAddress(Gap::addr_type_t type, const Gap::address_t address)
{