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:
- 61:119faa0dfeee
- Parent:
- 60:de30b62ab8c1
- Child:
- 62:3dc0dc3a0451
--- a/UUID.cpp Fri May 30 09:58:35 2014 +0100
+++ b/UUID.cpp Fri May 30 10:48:48 2014 +0100
@@ -67,10 +67,10 @@
UUID::UUID(const uint8_t longUUID[LENGTH_OF_LONG_UUID]) :
type(UUID_TYPE_SHORT),
baseUUID(),
- value(0)
+ shortUUID(0)
{
memcpy(baseUUID, longUUID, LENGTH_OF_LONG_UUID);
- value = (uint16_t)((longUUID[3] << 8) | (longUUID[2]));/* NEEDS REVIEW */
+ shortUUID = (uint16_t)((longUUID[3] << 8) | (longUUID[2]));/* NEEDS REVIEW */
/* Check if this is a short of a long UUID */
unsigned index;
@@ -102,11 +102,12 @@
The 16-bit BLE UUID value.
*/
/**************************************************************************/
-UUID::UUID(const uint16_t shortUUID) : type(UUID_TYPE_SHORT),
- baseUUID(),
- value(shortUUID)
+UUID::UUID(uint16_t shortUUID) : type(UUID_TYPE_SHORT),
+ baseUUID(),
+ shortUUID(shortUUID)
{
- /* NEEDS REVIEW */
+ /* 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);
}
