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: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Revision 290:aafa664ba829, committed 2015-03-02
- Comitter:
- rgrover1
- Date:
- Mon Mar 02 11:50:46 2015 +0000
- Parent:
- 289:4e2eac75f101
- Child:
- 291:0b66dd15728e
- Commit message:
- Synchronized with git rev fd762d8e
Author: Jeremy Brodt
Extended attribute length handling to support dynamic length.
Changed in this revision
| public/BLEDevice.h | Show annotated file Show diff for this revision Revisions of this file |
| public/GattAttribute.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/public/BLEDevice.h Mon Mar 02 11:50:46 2015 +0000
+++ b/public/BLEDevice.h Mon Mar 02 11:50:46 2015 +0000
@@ -71,7 +71,9 @@
* Any central device can connect to this peripheral.
*
* \par ADV_SCANNABLE_UNDIRECTED
- * Include support for Scan Response payloads.
+ * Any central device can connect to this peripheral, and
+ * the secondary Scan Response payload will be included or
+ * available to central devices.
*
* \par
* See Bluetooth Core Specification 4.0 (Vol. 3), Part C,
--- a/public/GattAttribute.h Mon Mar 02 11:50:46 2015 +0000
+++ b/public/GattAttribute.h Mon Mar 02 11:50:46 2015 +0000
@@ -46,7 +46,7 @@
*/
/**************************************************************************/
GattAttribute(const UUID &uuid, uint8_t *valuePtr = NULL, uint16_t initialLen = 0, uint16_t maxLen = 0) :
- _uuid(uuid), _valuePtr(valuePtr), _initialLen(initialLen), _lenMax(maxLen), _handle() {
+ _uuid(uuid), _valuePtr(valuePtr), _initialLen(initialLen), _lenMax(maxLen), _len(initialLen), _handle() {
/* empty */
}
@@ -55,6 +55,7 @@
const UUID &getUUID(void) const {return _uuid; }
uint16_t getInitialLength(void) const {return _initialLen;}
uint16_t getMaxLength(void) const {return _lenMax; }
+ uint16_t *getLengthPtr(void) {return &_len; }
void setHandle(Handle_t id) {_handle = id; }
uint8_t *getValuePtr(void) {return _valuePtr; }
@@ -63,6 +64,7 @@
uint8_t *_valuePtr;
uint16_t _initialLen; /* Initial length of the value */
uint16_t _lenMax; /* Maximum length of the value */
+ uint16_t _len; /* Current length of the value */
Handle_t _handle;
private:
