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 95:7f0d80ab964b, committed 2015-03-02
- Comitter:
- rgrover1
- Date:
- Mon Mar 02 11:34:45 2015 +0000
- Parent:
- 94:2bac1b3c5cfc
- Child:
- 96:f98c65780f4a
- Commit message:
- Synchronized with git rev 929136c4
Author: Rohit Grover
use GattAttribute::Handle_t for GattServer::readValue and updateValue
Changed in this revision
| nRF51GattServer.cpp | Show annotated file Show diff for this revision Revisions of this file |
| nRF51GattServer.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/nRF51GattServer.cpp Mon Mar 02 11:34:45 2015 +0000
+++ b/nRF51GattServer.cpp Mon Mar 02 11:34:45 2015 +0000
@@ -139,7 +139,7 @@
@endcode
*/
/**************************************************************************/
-ble_error_t nRF51GattServer::readValue(uint16_t charHandle, uint8_t buffer[], uint16_t *const lengthP)
+ble_error_t nRF51GattServer::readValue(GattAttribute::Handle_t charHandle, uint8_t buffer[], uint16_t *const lengthP)
{
ASSERT( ERROR_NONE ==
sd_ble_gatts_value_get(nrfCharacteristicHandles[charHandle].value_handle, 0, lengthP, buffer),
@@ -173,7 +173,7 @@
@endcode
*/
/**************************************************************************/
-ble_error_t nRF51GattServer::updateValue(uint16_t charHandle, uint8_t buffer[], uint16_t len, bool localOnly)
+ble_error_t nRF51GattServer::updateValue(GattAttribute::Handle_t charHandle, uint8_t buffer[], uint16_t len, bool localOnly)
{
uint16_t gapConnectionHandle = nRF51Gap::getInstance().getConnectionHandle();
ble_error_t returnValue = BLE_ERROR_NONE;
--- a/nRF51GattServer.h Mon Mar 02 11:34:45 2015 +0000
+++ b/nRF51GattServer.h Mon Mar 02 11:34:45 2015 +0000
@@ -33,8 +33,8 @@
/* Functions that must be implemented from GattServer */
virtual ble_error_t addService(GattService &);
- virtual ble_error_t readValue(uint16_t handle, uint8_t buffer[], uint16_t *const lengthP);
- virtual ble_error_t updateValue(uint16_t, uint8_t[], uint16_t, bool localOnly = false);
+ virtual ble_error_t readValue(GattAttribute::Handle_t handle, uint8_t buffer[], uint16_t *const lengthP);
+ virtual ble_error_t updateValue(GattAttribute::Handle_t, uint8_t[], uint16_t, bool localOnly = false);
virtual ble_error_t initializeGATTDatabase(void);
/* nRF51 Functions */
