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.
Dependencies: nrf51-sdk
Dependents: microbit-dal microbit-ble-open microbit-dal-eddystone microbit-dal-ble-accelerometer-example ... more
Diff: nRF51GattServer.cpp
- Revision:
- 340:775dab2ff027
- Parent:
- 336:6ac9e1b34de0
- Child:
- 344:2a44e5fd26bc
--- a/nRF51GattServer.cpp	Fri Jun 19 15:55:33 2015 +0100
+++ b/nRF51GattServer.cpp	Fri Jun 19 15:55:33 2015 +0100
@@ -336,22 +336,22 @@
         if (nrfCharacteristicHandles[i].value_handle == handle_value) {
             switch (eventType) {
                 case GattServerEvents::GATT_EVENT_DATA_WRITTEN: {
-                    GattWriteCallbackParams cbParams = {
-                        .handle  = i,
-                        .writeOp = static_cast<GattWriteCallbackParams::WriteOp_t>(gattsEventP->params.write.op),
-                        .offset  = gattsEventP->params.write.offset,
-                        .len     = gattsEventP->params.write.len,
-                        .data    = gattsEventP->params.write.data
+                    GattCharacteristicWriteCBParams cbParams = {
+                        .charHandle = i,
+                        .op     = static_cast<GattCharacteristicWriteCBParams::Type>(gattsEventP->params.write.op),
+                        .offset = gattsEventP->params.write.offset,
+                        .len    = gattsEventP->params.write.len,
+                        .data   = gattsEventP->params.write.data
                     };
                     handleDataWrittenEvent(&cbParams);
                     break;
                 }
                 case GattServerEvents::GATT_EVENT_WRITE_AUTHORIZATION_REQ: {
-                    GattWriteAuthCallbackParams cbParams = {
-                        .handle  = i,
-                        .offset  = gattsEventP->params.authorize_request.request.write.offset,
-                        .len     = gattsEventP->params.authorize_request.request.write.len,
-                        .data    = gattsEventP->params.authorize_request.request.write.data,
+                    GattCharacteristicWriteAuthCBParams cbParams = {
+                        .charHandle = i,
+                        .offset     = gattsEventP->params.authorize_request.request.write.offset,
+                        .len        = gattsEventP->params.authorize_request.request.write.len,
+                        .data       = gattsEventP->params.authorize_request.request.write.data,
                     };
                     ble_gatts_rw_authorize_reply_params_t reply = {
                         .type = BLE_GATTS_AUTHORIZE_TYPE_WRITE,
@@ -371,23 +371,23 @@
                      * have done if write-authorization had not been enabled.
                      */
                     if (reply.params.write.gatt_status == BLE_GATT_STATUS_SUCCESS) {
-                        GattWriteCallbackParams cbParams = {
-                            .handle  = i,
-                            .writeOp = static_cast<GattWriteCallbackParams::WriteOp_t>(gattsEventP->params.authorize_request.request.write.op),
-                            .offset  = gattsEventP->params.authorize_request.request.write.offset,
-                            .len     = gattsEventP->params.authorize_request.request.write.len,
-                            .data    = gattsEventP->params.authorize_request.request.write.data,
+                        GattCharacteristicWriteCBParams cbParams = {
+                            .charHandle = i,
+                            .op         = static_cast<GattCharacteristicWriteCBParams::Type>(gattsEventP->params.authorize_request.request.write.op),
+                            .offset     = gattsEventP->params.authorize_request.request.write.offset,
+                            .len        = gattsEventP->params.authorize_request.request.write.len,
+                            .data       = gattsEventP->params.authorize_request.request.write.data,
                         };
                         handleDataWrittenEvent(&cbParams);
                     }
                     break;
                 }
                 case GattServerEvents::GATT_EVENT_READ_AUTHORIZATION_REQ: {
-                    GattReadAuthCallbackParams cbParams = {
-                        .handle = i,
-                        .offset = gattsEventP->params.authorize_request.request.read.offset,
-                        .len    = 0,
-                        .data   = NULL
+                    GattCharacteristicReadAuthCBParams cbParams = {
+                        .charHandle = i,
+                        .offset     = gattsEventP->params.authorize_request.request.read.offset,
+                        .len        = 0,
+                        .data       = NULL
                     };
 
                     ble_gatts_rw_authorize_reply_params_t reply = {