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 508:31e63ad6923f, committed 2015-06-19
- Comitter:
- rgrover1
- Date:
- Fri Jun 19 15:52:04 2015 +0100
- Parent:
- 507:77c551e72d06
- Child:
- 509:fc2a15248577
- Commit message:
- Synchronized with git rev 06deb965
Author: Rohit Grover
GattClient now reuses GattCharacteristicReadCBParams
Changed in this revision
| public/DiscoveredCharacteristic.h | Show annotated file Show diff for this revision Revisions of this file |
| public/GattClient.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/public/DiscoveredCharacteristic.h Fri Jun 19 15:52:04 2015 +0100
+++ b/public/DiscoveredCharacteristic.h Fri Jun 19 15:52:04 2015 +0100
@@ -22,7 +22,6 @@
#include "GattAttribute.h"
#include "GattClient.h"
-
/**
* Structure for holding information about the service and the characteristics
* found during the discovery process.
@@ -154,7 +153,7 @@
Gap::Handle_t connHandle;
public:
- static ReadCallback_t onDataReadCallback;
+ static GattClient::ReadCallback_t onDataReadCallback;
};
#endif /*__DISCOVERED_CHARACTERISTIC_H__*/
\ No newline at end of file
--- a/public/GattClient.h Fri Jun 19 15:52:04 2015 +0100
+++ b/public/GattClient.h Fri Jun 19 15:52:04 2015 +0100
@@ -21,15 +21,11 @@
#include "GattAttribute.h"
#include "ServiceDiscovery.h"
+#include "GattCharacteristicCallbackParams.h"
+
class GattClient {
public:
- 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);
+ typedef void (*ReadCallback_t)(const GattCharacteristicReadCBParams *params);
enum WriteOp_t {
GATT_OP_INVALID = 0x00, /**< Invalid Operation. */
@@ -40,14 +36,7 @@
GATT_OP_EXEC_WRITE_REQ = 0x05, /**< Execute Write Request. */
};
- struct WriteResponse_t {
- GattAttribute::Handle_t handle; /**< Attribute Handle. */
- WriteOp_t writeOp;
- uint16_t offset; /**< Offset of the attribute data. */
- uint16_t len; /**< Attribute data length. */
- const uint8_t *data; /**< Attribute data, variable length. */
- };
- typedef void (*WriteCallback_t)(const WriteResponse_t *params);
+ typedef void (*WriteCallback_t)(const GattCharacteristicWriteCBParams *params);
public:
/**
