Nordic stack and drivers for the mbed BLE API Modified for HRM1017 for library 0.1.0

Fork of nRF51822 by Nordic Semiconductor

Files at this revision

API Documentation at this revision

Comitter:
Rohit Grover
Date:
Wed Jun 11 14:44:16 2014 +0100
Parent:
28:fdc1a88a80c8
Child:
30:85305292b44f
Commit message:
make use of GattService::setHandle()

Changed in this revision

nRF51GattServer.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/nRF51GattServer.cpp	Wed Jun 11 13:55:00 2014 +0100
+++ b/nRF51GattServer.cpp	Wed Jun 11 14:44:16 2014 +0100
@@ -47,11 +47,14 @@
     /* Add the service to the nRF51 */
     ble_uuid_t nordicUUID;
     nordicUUID = custom_convert_to_nordic_uuid(service.getUUID());
+
+    uint16_t serviceHandle;
     ASSERT( ERROR_NONE ==
             sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY,
                                      &nordicUUID,
-                                     service.getHandlePtr()),
+                                     &serviceHandle),
             BLE_ERROR_PARAM_OUT_OF_RANGE );
+    service.setHandle(serviceHandle);
 
     /* Add characteristics to the service */
     for (uint8_t i = 0; i < service.getCharacteristicCount(); i++) {