extend

Fork of BLE_API by Bluetooth Low Energy

Revision:
512:0584e40bece2
Parent:
508:31e63ad6923f
--- a/public/DiscoveredCharacteristic.h	Fri Jun 19 15:52:04 2015 +0100
+++ b/public/DiscoveredCharacteristic.h	Fri Jun 19 15:52:05 2015 +0100
@@ -94,11 +94,8 @@
      * @param  value
      *           The bytes being written.
      *
-     * @note   It is important to note that a write without response will generate
-     *         an onDataSent() callback when the packet has been transmitted. There
-     *         will be a BLE-stack specific limit to the number of pending
-     *         writeWoResponse operations; the user may want to use the onDataSent()
-     *         callback for flow-control.
+     * @note   It is important to note that a write will generate
+     *         an onDataWritten() callback when the peer acknowledges the request.
      *
      * @retval BLE_ERROR_NONE Successfully started the Write procedure, else
      *         BLE_ERROR_INVALID_STATE if some internal state about the connection is invalid, or
@@ -112,6 +109,10 @@
         onDataReadCallback = callback;
     }
 
+    static void setupOnDataWrite(GattClient::WriteCallback_t callback) {
+        onDataWriteCallback = callback;
+    }
+
     void setupLongUUID(UUID::LongUUIDBytes_t longUUID) {
         uuid.setupLong(longUUID);
     }
@@ -153,7 +154,8 @@
     Gap::Handle_t           connHandle;
 
 public:
-    static GattClient::ReadCallback_t onDataReadCallback;
+    static GattClient::ReadCallback_t  onDataReadCallback;
+    static GattClient::WriteCallback_t onDataWriteCallback;
 };
 
 #endif /*__DISCOVERED_CHARACTERISTIC_H__*/
\ No newline at end of file