@@ -54,21 +54,21 @@ static uint8_t char2int(char c)
54
54
/* *
55
55
* Representation of a Universally Unique Identifier (UUID).
56
56
*
57
- * UUIDs are 128 bits wide number used to identify data type and elements in
57
+ * UUIDs are 128-bit wide numbers used to identify data type and elements in
58
58
* many layers of the Bluetooth specification.
59
59
*
60
60
* Two representations of UUIDS exist:
61
- * - 16 bits UUIDs: Shortened representation of the 128 bit UUID
61
+ * - 16-bit UUIDs: Shortened representation of the 128 bit UUID
62
62
* 0000xxxx-0000-1000-8000-00805F9B34FB where xxxx is the 16 bit UUID.
63
63
* Values of those UUIDs are defined by the Bluetooth body. The short
64
- * representation save bandwidth during protocol transactions.
65
- * - 128 bits UUIDs: Complete representation of an UUID. They are commonly
64
+ * representation saves bandwidth during protocol transactions.
65
+ * - 128-bit UUIDs: Complete representation of a UUID. They are commonly
66
66
* used for user defined UUID.
67
67
*
68
- * This class act as an adapter over these two kind of UUIDs to allow
69
- * indiscriminate usage of both forms in mbed BLE APIs .
68
+ * This class acts as an adapter over these two kinds of UUIDs to allow
69
+ * indiscriminate use of both forms in Mbed BLE APIs.
70
70
*
71
- * @note 32 bits UUID representation is not supported at the current moment .
71
+ * @note 32-bit UUID representation is not supported currently .
72
72
*/
73
73
class UUID {
74
74
public:
@@ -91,16 +91,16 @@ class UUID {
91
91
/* *
92
92
* Enumeration of byte ordering.
93
93
*
94
- * It is used to construct 128 byte UUIDs.
94
+ * It is used to construct 128- byte UUIDs.
95
95
*/
96
96
typedef enum {
97
97
/* *
98
- * Most- significant byte first (at the smallest address).
98
+ * Most significant byte first (at the smallest address).
99
99
*/
100
100
MSB,
101
101
102
102
/* *
103
- * Least- significant byte first (at the smallest address).
103
+ * Least significant byte first (at the smallest address).
104
104
*/
105
105
LSB
106
106
} ByteOrder_t;
@@ -140,8 +140,8 @@ class UUID {
140
140
* @note Upper and lower case are supported.
141
141
* @note Hyphens are optional. The string must include at most four hyphens.
142
142
*
143
- * @note Internally the UUID is stored in the little endian order as a 16
144
- * byte array.
143
+ * @note Internally, the UUID is stored in the little endian order as a
144
+ * 16- byte array.
145
145
*/
146
146
UUID (const char * stringUUID) :
147
147
type (UUID_TYPE_LONG),
@@ -154,8 +154,8 @@ class UUID {
154
154
uint8_t tempUUID[LENGTH_OF_LONG_UUID];
155
155
156
156
/*
157
- * Iterate through string, abort if NULL is encountered prematurely.
158
- * Ignore upto four hyphens.
157
+ * Iterate through string; abort if NULL is encountered prematurely.
158
+ * Ignore up to four hyphens.
159
159
*/
160
160
for (size_t index = 0 ; (index < MAX_UUID_STRING_LENGTH) && (baseIndex < LENGTH_OF_LONG_UUID); index++) {
161
161
if (stringUUID[index] == ' \0 ' ) {
@@ -189,7 +189,7 @@ class UUID {
189
189
}
190
190
191
191
/* *
192
- * Construct a new UUID from a 128-bits representation.
192
+ * Construct a new UUID from a 128-bit representation.
193
193
*
194
194
* @param[in] longUUID The 128-bit (16-byte) of the UUID value.
195
195
* @param[in] order Bytes order of @p longUUID.
@@ -201,17 +201,17 @@ class UUID {
201
201
/* *
202
202
* Creates a new 16-bit UUID.
203
203
*
204
- * 16 bit wide UUIDs are defined by the Bluetoth standard body and are the
205
- * shortened version of the UUID 0000xxxx-0000-1000-8000-00805F9B34FB where
206
- * xxxx represent is the value of the 16 bit UUID.
204
+ * The Bluetooth standard body defines 16-bit wide UUIDs. They are the
205
+ * shortened version of the UUID 0000xxxx-0000-1000-8000-00805F9B34FB, where
206
+ * xxxx is the value of the 16- bit UUID.
207
207
*
208
- * @important 16 bit UUIDs shall not be used in user defined data type or
208
+ * @important 16- bit UUIDs are not used in user defined data type or
209
209
* user defined element ID.
210
210
*
211
- * @param[in] _shortUUID 16 bit part of the standard UUID.
211
+ * @param[in] _shortUUID 16- bit part of the standard UUID.
212
212
* The short UUID value.
213
213
*
214
- * @note User defined UUID are commonly named vendor-specific UUIDs across
214
+ * @note User defined UUIDs are commonly named vendor-specific UUIDs across
215
215
* the Bluetooth literature.
216
216
*/
217
217
UUID (ShortUUIDBytes_t _shortUUID) :
@@ -246,9 +246,9 @@ class UUID {
246
246
}
247
247
248
248
/* *
249
- * Replace existing value with a 128 bit UUID.
249
+ * Replace existing value with a 128- bit UUID.
250
250
*
251
- * @param[in] longUUID New 16 byte wide UUID value.
251
+ * @param[in] longUUID New 16- byte wide UUID value.
252
252
* @param[in] order Byte ordering of @p longUUID.
253
253
*/
254
254
void setupLong (const LongUUIDBytes_t longUUID, ByteOrder_t order = UUID::MSB)
@@ -270,8 +270,8 @@ class UUID {
270
270
/* *
271
271
* Return the internal type of the UUID.
272
272
*
273
- * @return UUID_TYPE_SHORT if the UUID is 16 bit wide.
274
- * @return UUID_TYPE_LONG if the UUID is 128 bit wide.
273
+ * @return UUID_TYPE_SHORT if the UUID is 16- bit wide.
274
+ * @return UUID_TYPE_LONG if the UUID is 128- bit wide.
275
275
*/
276
276
UUID_Type_t shortOrLong (void ) const
277
277
{
@@ -281,8 +281,8 @@ class UUID {
281
281
/* *
282
282
* Get a pointer to the UUID value based on the current UUID type.
283
283
*
284
- * @return A pointer to an uint16_t object if the UUID is 16 bit long.
285
- * @return A pointer to an array of 16 bytes if the UUID is 128 bit long.
284
+ * @return A pointer to an uint16_t object if the UUID is 16 bits long.
285
+ * @return A pointer to an array of 16 bytes if the UUID is 128 bits long.
286
286
*/
287
287
const uint8_t *getBaseUUID (void ) const
288
288
{
@@ -296,7 +296,7 @@ class UUID {
296
296
/* *
297
297
* Get the uint16_t value of the UUID.
298
298
*
299
- * @important This function shall not be used on long UUIDs.
299
+ * @important This function is not used on long UUIDs.
300
300
*
301
301
* @return The value of the shortened UUID.
302
302
*/
0 commit comments