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: BLE_ANCS_SDAPI BLE_temperature BLE_HeartRate writable_gatt ... more
Diff: nRF51GattServer.cpp
- Revision:
- 108:27213b9fd4f9
- Parent:
- 101:18a6f0b9c350
- Child:
- 112:737b08b3b995
diff -r 55302fd80c35 -r 27213b9fd4f9 nRF51GattServer.cpp
--- a/nRF51GattServer.cpp Wed Apr 15 08:59:24 2015 +0100
+++ b/nRF51GattServer.cpp Wed Apr 15 08:59:24 2015 +0100
@@ -173,7 +173,7 @@
@endcode
*/
/**************************************************************************/
-ble_error_t nRF51GattServer::updateValue(GattAttribute::Handle_t charHandle, uint8_t buffer[], uint16_t len, bool localOnly)
+ble_error_t nRF51GattServer::updateValue(GattAttribute::Handle_t charHandle, const uint8_t buffer[], uint16_t len, bool localOnly)
{
uint16_t gapConnectionHandle = nRF51Gap::getInstance().getConnectionHandle();
ble_error_t returnValue = BLE_ERROR_NONE;
@@ -199,7 +199,7 @@
GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY) ?
BLE_GATT_HVX_NOTIFICATION : BLE_GATT_HVX_INDICATION;
hvx_params.offset = 0;
- hvx_params.p_data = buffer;
+ hvx_params.p_data = const_cast<uint8_t *>(buffer);
hvx_params.p_len = &len;
error_t error = (error_t) sd_ble_gatts_hvx(gapConnectionHandle, &hvx_params);

