High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Revision:
567:e4b38e43de7c
Parent:
528:8d21604fe31d
Child:
569:a5a6a1681fcf
--- a/services/UARTService.h	Fri Jun 19 15:52:11 2015 +0100
+++ b/services/UARTService.h	Fri Jun 19 15:52:28 2015 +0100
@@ -21,7 +21,7 @@
 #include "Stream.h"
 
 #include "UUID.h"
-#include "BLE.h"
+#include "BLEDevice.h"
 
 extern const uint8_t  UARTServiceBaseUUID[UUID::LENGTH_OF_LONG_UUID];
 extern const uint16_t UARTServiceShortUUID;
@@ -48,9 +48,9 @@
 
     /**
     * @param[ref] ble
-    *               BLE object for the underlying controller.
+    *                 BLEDevice object for the underlying controller.
     */
-    UARTService(BLE &_ble) :
+    UARTService(BLEDevice &_ble) :
         ble(_ble),
         receiveBuffer(),
         sendBuffer(),
@@ -167,8 +167,8 @@
      * function from the global onDataWritten() callback handler; or if that's
      * not used, this method can be used as a callback directly.
      */
-    void onDataWritten(const GattWriteCallbackParams *params) {
-        if (params->handle == getTXCharacteristicHandle()) {
+    void onDataWritten(const GattCharacteristicWriteCBParams *params) {
+        if (params->charHandle == getTXCharacteristicHandle()) {
             uint16_t bytesRead = params->len;
             if (bytesRead <= BLE_UART_SERVICE_MAX_DATA_LEN) {
                 numBytesReceived   = bytesRead;
@@ -179,7 +179,7 @@
     }
 
 private:
-    BLE                &ble;
+    BLEDevice          &ble;
 
     uint8_t             receiveBuffer[BLE_UART_SERVICE_MAX_DATA_LEN]; /**< The local buffer into which we receive
                                                                        *   inbound data before forwarding it to the