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
Diff: UUID.cpp
- Revision:
- 62:3dc0dc3a0451
- Parent:
- 61:119faa0dfeee
- Child:
- 67:0fac4e99f29b
--- a/UUID.cpp Fri May 30 10:48:48 2014 +0100
+++ b/UUID.cpp Mon Jun 02 14:58:56 2014 +0100
@@ -70,7 +70,7 @@
shortUUID(0)
{
memcpy(baseUUID, longUUID, LENGTH_OF_LONG_UUID);
- shortUUID = (uint16_t)((longUUID[3] << 8) | (longUUID[2]));/* NEEDS REVIEW */
+ shortUUID = (uint16_t)((longUUID[2] << 8) | (longUUID[3]));
/* Check if this is a short of a long UUID */
unsigned index;
@@ -83,7 +83,6 @@
if (baseUUID[index] != 0) {
type = UUID_TYPE_LONG;
- /* NEEDS REVIEW */
/* zero out the 16-bit part in the base; this will help equate long
* UUIDs when they differ only in this 16-bit relative part.*/
baseUUID[2] = 0;
@@ -104,12 +103,8 @@
/**************************************************************************/
UUID::UUID(uint16_t shortUUID) : type(UUID_TYPE_SHORT),
baseUUID(),
- shortUUID(shortUUID)
-{
- /* NEEDS REVIEW; actually, I'm not sure if we need to populate the baseUUID
- * with the shortUUID here.*/
- baseUUID[2] = (shortUUID >> 8);
- baseUUID[3] = (shortUUID & 0xff);
+ shortUUID(shortUUID) {
+ /* empty */
}
/**************************************************************************/
