SG RFID nRF51822 fork
Fork of nRF51822 by
Revision 84:658e5ec772a1, committed 2014-12-12
- Comitter:
- rgrover1
- Date:
- Fri Dec 12 14:15:16 2014 +0000
- Parent:
- 83:71302acf1804
- Child:
- 85:17fe69405098
- Commit message:
- Synchronized with git rev 03791a03
Author: Rohit Grover
minor changes to fix GCC compiler issues
Changed in this revision
btle/custom/custom_helper.cpp | Show annotated file Show diff for this revision Revisions of this file |
nRF51GattServer.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/btle/custom/custom_helper.cpp Fri Dec 12 13:23:18 2014 +0000 +++ b/btle/custom/custom_helper.cpp Fri Dec 12 14:15:16 2014 +0000 @@ -214,10 +214,10 @@ (char_props.notify || char_props.indicate) ? &cccd_md : NULL; /* Attribute declaration */ - ble_gatts_attr_md_t attr_md = { - .rd_auth = readAuthorization, - .wr_auth = writeAuthorization, - }; + ble_gatts_attr_md_t attr_md = {0}; + + attr_md.rd_auth = readAuthorization; + attr_md.wr_auth = writeAuthorization; attr_md.vloc = BLE_GATTS_VLOC_STACK; attr_md.vlen = (min_length == max_length) ? 0 : 1;
--- a/nRF51GattServer.cpp Fri Dec 12 13:23:18 2014 +0000 +++ b/nRF51GattServer.cpp Fri Dec 12 14:15:16 2014 +0000 @@ -319,7 +319,7 @@ }; ble_gatts_rw_authorize_reply_params_t reply = { .type = BLE_GATTS_AUTHORIZE_TYPE_WRITE, - .params { + .params = { .write = { .gatt_status = (p_characteristics[i]->authorizeWrite(&cbParams) ? BLE_GATT_STATUS_SUCCESS : BLE_GATT_STATUS_ATTERR_WRITE_NOT_PERMITTED) @@ -336,7 +336,7 @@ }; ble_gatts_rw_authorize_reply_params_t reply = { .type = BLE_GATTS_AUTHORIZE_TYPE_READ, - .params { + .params = { .read = { .gatt_status = (p_characteristics[i]->authorizeRead(&cbParams) ? BLE_GATT_STATUS_SUCCESS : BLE_GATT_STATUS_ATTERR_READ_NOT_PERMITTED)