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 469:c95e603d60dd, committed 2015-06-19
- Comitter:
- rgrover1
- Date:
- Fri Jun 19 15:51:59 2015 +0100
- Parent:
- 468:bbf2a395bb8d
- Child:
- 470:150c2363f776
- Commit message:
- Synchronized with git rev b4ccb331
Author: Rohit Grover
introduce ReadResponse_t to DiscoveredCharacteristic
Changed in this revision
| public/ServiceDiscovery.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/public/ServiceDiscovery.h Fri Jun 19 15:51:59 2015 +0100
+++ b/public/ServiceDiscovery.h Fri Jun 19 15:51:59 2015 +0100
@@ -109,6 +109,18 @@
uint8_t auth_signed_wr :1; /**< Writing the value with Signed Write Command permitted. */
};
+ struct ReadResponse_t {
+ GattAttribute::Handle_t handle; /**< Attribute Handle. */
+ uint16_t offset; /**< Offset of the attribute data. */
+ uint16_t len; /**< Attribute data length. */
+ const uint8_t *data; /**< Attribute data, variable length. */
+ };
+ typedef void (*ReadCallback_t)(const ReadResponse_t *params);
+
+ static void setupOnDataRead(ReadCallback_t callback) {
+ onDataReadCallback = callback;
+ }
+
public:
void setup(Properties_t propsIn,
GattAttribute::Handle_t declHandleIn,
@@ -161,6 +173,8 @@
Properties_t props;
GattAttribute::Handle_t declHandle;
GattAttribute::Handle_t valueHandle;
+
+ static ReadCallback_t onDataReadCallback;
};
public:
