Minor temporary patch to allow DFU packet callback

Fork of BLE_API by Bluetooth Low Energy

Revision:
230:2c414d3240a8
Parent:
227:5c4cb4553821
Child:
244:aa639ef2f290
--- a/public/BLEDevice.h	Wed Dec 03 14:38:40 2014 +0000
+++ b/public/BLEDevice.h	Wed Dec 03 14:38:40 2014 +0000
@@ -36,6 +36,11 @@
     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:
     /**
@@ -365,6 +370,13 @@
 }
 
 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)
 {
     return transport->getGap().setAddress(type, address);