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: LinkNode_SimpleChatwithSerial
Fork of BLE_API by
Revision 1038:ebf9746bff7d, committed 2015-12-10
- Comitter:
- rgrover1
- Date:
- Thu Dec 10 09:15:04 2015 +0000
- Parent:
- 1037:ec64da75c9ee
- Child:
- 1039:2ea9d52111e2
- Commit message:
- Synchronized with git rev 9ba09113
Author: Rohit Grover
rename UUID::BitOrder_t to ByteOrder
Changed in this revision
--- a/ble/DiscoveredCharacteristic.h Thu Dec 10 09:15:04 2015 +0000
+++ b/ble/DiscoveredCharacteristic.h Thu Dec 10 09:15:04 2015 +0000
@@ -142,7 +142,7 @@
*/
ble_error_t write(uint16_t length, const uint8_t *value, const GattClient::WriteCallback_t& onRead) const;
- void setupLongUUID(UUID::LongUUIDBytes_t longUUID, UUID::BitOrder_t order = UUID::MSB) {
+ void setupLongUUID(UUID::LongUUIDBytes_t longUUID, UUID::ByteOrder_t order = UUID::MSB) {
uuid.setupLong(longUUID, order);
}
--- a/ble/DiscoveredService.h Thu Dec 10 09:15:04 2015 +0000
+++ b/ble/DiscoveredService.h Thu Dec 10 09:15:04 2015 +0000
@@ -36,7 +36,7 @@
endHandle = endHandleIn;
}
- void setupLongUUID(UUID::LongUUIDBytes_t longUUID, UUID::BitOrder_t order = UUID::MSB) {
+ void setupLongUUID(UUID::LongUUIDBytes_t longUUID, UUID::ByteOrder_t order = UUID::MSB) {
uuid.setupLong(longUUID, order);
}
--- a/ble/UUID.h Thu Dec 10 09:15:04 2015 +0000
+++ b/ble/UUID.h Thu Dec 10 09:15:04 2015 +0000
@@ -46,10 +46,13 @@
UUID_TYPE_LONG = 1 // Full 128-bit UUID.
};
+ /**
+ * An enumeration to specify byte ordering of the long version of the UUID.
+ */
typedef enum {
- MSB,
- LSB
- } BitOrder_t;
+ MSB, /*!< Most-significant byte first (at the smallest address) */
+ LSB /*!< least-significant byte first (at the smallest address) */
+ } ByteOrder_t;
typedef uint16_t ShortUUIDBytes_t;
@@ -123,7 +126,7 @@
* @param order
* The bit order of the UUID, MSB by default.
*/
- UUID(const LongUUIDBytes_t longUUID, BitOrder_t order = UUID::MSB) : type(UUID_TYPE_LONG), baseUUID(), shortUUID(0) {
+ UUID(const LongUUIDBytes_t longUUID, ByteOrder_t order = UUID::MSB) : type(UUID_TYPE_LONG), baseUUID(), shortUUID(0) {
setupLong(longUUID, order);
}
@@ -170,7 +173,7 @@
/**
* Fill in a 128-bit UUID; this is useful when the UUID isn't known at the time of the object construction.
*/
- void setupLong(const LongUUIDBytes_t longUUID, BitOrder_t order = UUID::MSB) {
+ void setupLong(const LongUUIDBytes_t longUUID, ByteOrder_t order = UUID::MSB) {
type = UUID_TYPE_LONG;
if (order == UUID::MSB) {
// Switch endian. Input is big-endian, internal representation is little endian.
