Minor temporary patch to allow DFU packet callback
Fork of BLE_API by
Revision 61:119faa0dfeee, committed 2014-05-30
- Comitter:
- Rohit Grover
- Date:
- Fri May 30 10:48:48 2014 +0100
- Parent:
- 60:de30b62ab8c1
- Child:
- 62:3dc0dc3a0451
- Commit message:
- rename "value" member of UUID as shortUUID
Changed in this revision
UUID.cpp | Show annotated file Show diff for this revision Revisions of this file |
UUID.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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); }
--- a/UUID.h Fri May 30 09:58:35 2014 +0100 +++ b/UUID.h Fri May 30 10:48:48 2014 +0100 @@ -32,7 +32,7 @@ public: UUID(const uint8_t longUUID[LENGTH_OF_LONG_UUID]); - UUID(uint16_t shortUUID); + UUID(uint16_t uuid); virtual ~UUID(void); public: @@ -43,7 +43,7 @@ return baseUUID; } uint16_t get16BitUUID(void) const { - return value; + return shortUUID; } private: @@ -53,7 +53,7 @@ * are zeroed out to allow comparison with other long * UUIDs which differ only in the 16-bit relative * part.*/ - uint16_t value; // 16 bit uuid (byte 2-3 using with base) + uint16_t shortUUID; // 16 bit uuid (byte 2-3 using with base) }; #endif // ifndef __UUID_H__