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.
Fork of nRF51822 by
Revision 88:fdb2b0db620e, committed 2015-01-21
- Comitter:
- rgrover1
- Date:
- Wed Jan 21 10:01:16 2015 +0000
- Parent:
- 87:f9516241903b
- Child:
- 89:c0dbd55614b2
- Commit message:
- Synchronized with git rev 7ce29248
Author: Marcus Chang
Updated return value for nRF51GattServer::updateValue. Will now report when call fails.
Changed in this revision
| nRF51GattServer.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/nRF51GattServer.cpp Wed Jan 21 10:01:16 2015 +0000
+++ b/nRF51GattServer.cpp Wed Jan 21 10:01:16 2015 +0000
@@ -176,6 +176,7 @@
ble_error_t nRF51GattServer::updateValue(uint16_t charHandle, uint8_t buffer[], uint16_t len, bool localOnly)
{
uint16_t gapConnectionHandle = nRF51Gap::getInstance().getConnectionHandle();
+ ble_error_t returnValue = BLE_ERROR_NONE;
if (localOnly) {
/* Only update locally regardless of notify/indicate */
@@ -212,13 +213,22 @@
sd_ble_gatts_value_set(nrfCharacteristicHandles[charHandle].value_handle, 0, &len, buffer),
BLE_ERROR_PARAM_OUT_OF_RANGE );
}
+
+ /* Notifications consume application buffers. The return value can
+ be used for resending notifications.
+ */
+ if (error != ERROR_NONE)
+ {
+ returnValue = BLE_STACK_BUSY;
+ }
+
} else {
ASSERT_INT( ERROR_NONE,
sd_ble_gatts_value_set(nrfCharacteristicHandles[charHandle].value_handle, 0, &len, buffer),
BLE_ERROR_PARAM_OUT_OF_RANGE );
}
- return BLE_ERROR_NONE;
+ return returnValue;
}
/**************************************************************************/
