mediCAL's first BLE project
Fork of nRF51822 by
Revision 20:b4f64efaaa2c, committed 2014-06-05
- Comitter:
- Rohit Grover
- Date:
- Thu Jun 05 11:38:33 2014 +0100
- Parent:
- 19:c5b5cb65cc6f
- Child:
- 21:84599842b5fb
- Commit message:
- use GattServer accessors
Changed in this revision
nRF51GattServer.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/nRF51GattServer.cpp Thu Jun 05 08:53:18 2014 +0100 +++ b/nRF51GattServer.cpp Thu Jun 05 11:38:33 2014 +0100 @@ -46,21 +46,21 @@ /* Add the service to the nRF51 */ ble_uuid_t nordicUUID; - nordicUUID = custom_convert_to_nordic_uuid(service.primaryServiceID); + nordicUUID = custom_convert_to_nordic_uuid(service.getUUID()); ASSERT( ERROR_NONE == sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &nordicUUID, - &service.handle), + service.getHandlePtr()), BLE_ERROR_PARAM_OUT_OF_RANGE ); /* Add characteristics to the service */ - for (uint8_t i = 0; i < service.characteristicCount; i++) { - GattCharacteristic *p_char = service.characteristics[i]; + for (uint8_t i = 0; i < service.getCharacteristicCount(); i++) { + GattCharacteristic *p_char = service.getCharacteristic(i); nordicUUID = custom_convert_to_nordic_uuid(p_char->getUUID()); ASSERT ( ERROR_NONE == - custom_add_in_characteristic(service.handle, + custom_add_in_characteristic(service.getHandle(), &nordicUUID, p_char->getProperties(), NULL,