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 BLE_API by
Revision 328:1fd12f67ed7a, committed 2015-04-15
- Comitter:
- rgrover1
- Date:
- Wed Apr 15 09:05:09 2015 +0100
- Parent:
- 327:8c645f5694b2
- Child:
- 329:2e082a9c7c13
- Commit message:
- Synchronized with git rev 7e9fc2ae
Author: Rohit Grover
minor parameter renames and removal of un-necessary consts
Changed in this revision
| public/BLEDevice.h | Show annotated file Show diff for this revision Revisions of this file |
| public/GattServer.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/public/BLEDevice.h Fri Mar 27 13:03:37 2015 +0000
+++ b/public/BLEDevice.h Wed Apr 15 09:05:09 2015 +0100
@@ -299,13 +299,13 @@
* input: Length in bytes to be read,
* output: Total length of attribute value upon successful return.
*/
- ble_error_t readCharacteristicValue(GattAttribute::Handle_t handle, uint8_t *const buffer, uint16_t *const lengthP);
+ ble_error_t readCharacteristicValue(GattAttribute::Handle_t attributeHandle, uint8_t *buffer, uint16_t *lengthP);
/**
* @param localOnly
* Only update the characteristic locally regardless of notify/indicate flags in the CCCD.
*/
- ble_error_t updateCharacteristicValue(GattAttribute::Handle_t handle, const uint8_t *value, uint16_t size, bool localOnly = false);
+ ble_error_t updateCharacteristicValue(GattAttribute::Handle_t attributeHandle, const uint8_t *value, uint16_t size, bool localOnly = false);
/**
* Yield control to the BLE stack or to other tasks waiting for events. This
@@ -653,15 +653,15 @@
return transport->getGap().getState();
}
-inline ble_error_t BLEDevice::readCharacteristicValue(GattAttribute::Handle_t handle, uint8_t *const buffer, uint16_t *const lengthP)
+inline ble_error_t BLEDevice::readCharacteristicValue(GattAttribute::Handle_t attributeHandle, uint8_t *buffer, uint16_t *lengthP)
{
- return transport->getGattServer().readValue(handle, buffer, lengthP);
+ return transport->getGattServer().readValue(attributeHandle, buffer, lengthP);
}
inline ble_error_t
-BLEDevice::updateCharacteristicValue(GattAttribute::Handle_t handle, const uint8_t *value, uint16_t size, bool localOnly)
+BLEDevice::updateCharacteristicValue(GattAttribute::Handle_t attributeHandle, const uint8_t *value, uint16_t size, bool localOnly)
{
- return transport->getGattServer().updateValue(handle, const_cast<uint8_t *>(value), size, localOnly);
+ return transport->getGattServer().updateValue(attributeHandle, const_cast<uint8_t *>(value), size, localOnly);
}
inline void
--- a/public/GattServer.h Fri Mar 27 13:03:37 2015 +0000
+++ b/public/GattServer.h Wed Apr 15 09:05:09 2015 +0100
@@ -44,10 +44,10 @@
friend class BLEDevice;
private:
/* These functions must be defined in the sub-class */
- virtual ble_error_t addService(GattService &) = 0;
- virtual ble_error_t readValue(GattAttribute::Handle_t handle, uint8_t buffer[], uint16_t *const lengthP) = 0;
- virtual ble_error_t updateValue(GattAttribute::Handle_t, uint8_t[], uint16_t, bool localOnly = false) = 0;
- virtual ble_error_t initializeGATTDatabase(void) = 0;
+ virtual ble_error_t addService(GattService &) = 0;
+ virtual ble_error_t readValue(GattAttribute::Handle_t attributeHandle, uint8_t buffer[], uint16_t *lengthP) = 0;
+ virtual ble_error_t updateValue(GattAttribute::Handle_t, const uint8_t[], uint16_t, bool localOnly = false) = 0;
+ virtual ble_error_t initializeGATTDatabase(void) = 0;
// ToDo: For updateValue, check the CCCD to see if the value we are
// updating has the notify or indicate bits sent, and if BOTH are set
