Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Peripheral_1_serial_copy Peripheral_1_serial 151006_1st_Scenario_normal
Fork of nRF51822 by
Diff: nRF51GattServer.cpp
- Revision:
- 29:cee837a465a1
- Parent:
- 28:fdc1a88a80c8
- Child:
- 30:85305292b44f
--- 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++) {
