Skip to content

Commit 1720a48

Browse files
author
Amanda Butler
authored
Copy edit UUID.h
Copy edit, mostly for consistent tense and consistent use of hyphens.
1 parent 71bc3f7 commit 1720a48

File tree

1 file changed

+28
-28
lines changed
  • features/FEATURE_BLE/ble

1 file changed

+28
-28
lines changed

features/FEATURE_BLE/ble/UUID.h

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,21 @@ static uint8_t char2int(char c)
5454
/**
5555
* Representation of a Universally Unique Identifier (UUID).
5656
*
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
5858
* many layers of the Bluetooth specification.
5959
*
6060
* 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
6262
* 0000xxxx-0000-1000-8000-00805F9B34FB where xxxx is the 16 bit UUID.
6363
* 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
6666
* used for user defined UUID.
6767
*
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.
7070
*
71-
* @note 32 bits UUID representation is not supported at the current moment.
71+
* @note 32-bit UUID representation is not supported currently.
7272
*/
7373
class UUID {
7474
public:
@@ -91,16 +91,16 @@ class UUID {
9191
/**
9292
* Enumeration of byte ordering.
9393
*
94-
* It is used to construct 128 byte UUIDs.
94+
* It is used to construct 128-byte UUIDs.
9595
*/
9696
typedef enum {
9797
/**
98-
* Most-significant byte first (at the smallest address).
98+
* Most significant byte first (at the smallest address).
9999
*/
100100
MSB,
101101

102102
/**
103-
* Least-significant byte first (at the smallest address).
103+
* Least significant byte first (at the smallest address).
104104
*/
105105
LSB
106106
} ByteOrder_t;
@@ -140,8 +140,8 @@ class UUID {
140140
* @note Upper and lower case are supported.
141141
* @note Hyphens are optional. The string must include at most four hyphens.
142142
*
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.
145145
*/
146146
UUID(const char* stringUUID) :
147147
type(UUID_TYPE_LONG),
@@ -154,8 +154,8 @@ class UUID {
154154
uint8_t tempUUID[LENGTH_OF_LONG_UUID];
155155

156156
/*
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.
159159
*/
160160
for (size_t index = 0; (index < MAX_UUID_STRING_LENGTH) && (baseIndex < LENGTH_OF_LONG_UUID); index++) {
161161
if (stringUUID[index] == '\0') {
@@ -189,7 +189,7 @@ class UUID {
189189
}
190190

191191
/**
192-
* Construct a new UUID from a 128-bits representation.
192+
* Construct a new UUID from a 128-bit representation.
193193
*
194194
* @param[in] longUUID The 128-bit (16-byte) of the UUID value.
195195
* @param[in] order Bytes order of @p longUUID.
@@ -201,17 +201,17 @@ class UUID {
201201
/**
202202
* Creates a new 16-bit UUID.
203203
*
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.
207207
*
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
209209
* user defined element ID.
210210
*
211-
* @param[in] _shortUUID 16 bit part of the standard UUID.
211+
* @param[in] _shortUUID 16-bit part of the standard UUID.
212212
* The short UUID value.
213213
*
214-
* @note User defined UUID are commonly named vendor-specific UUIDs across
214+
* @note User defined UUIDs are commonly named vendor-specific UUIDs across
215215
* the Bluetooth literature.
216216
*/
217217
UUID(ShortUUIDBytes_t _shortUUID) :
@@ -246,9 +246,9 @@ class UUID {
246246
}
247247

248248
/**
249-
* Replace existing value with a 128 bit UUID.
249+
* Replace existing value with a 128-bit UUID.
250250
*
251-
* @param[in] longUUID New 16 byte wide UUID value.
251+
* @param[in] longUUID New 16-byte wide UUID value.
252252
* @param[in] order Byte ordering of @p longUUID.
253253
*/
254254
void setupLong(const LongUUIDBytes_t longUUID, ByteOrder_t order = UUID::MSB)
@@ -270,8 +270,8 @@ class UUID {
270270
/**
271271
* Return the internal type of the UUID.
272272
*
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.
275275
*/
276276
UUID_Type_t shortOrLong(void) const
277277
{
@@ -281,8 +281,8 @@ class UUID {
281281
/**
282282
* Get a pointer to the UUID value based on the current UUID type.
283283
*
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.
286286
*/
287287
const uint8_t *getBaseUUID(void) const
288288
{
@@ -296,7 +296,7 @@ class UUID {
296296
/**
297297
* Get the uint16_t value of the UUID.
298298
*
299-
* @important This function shall not be used on long UUIDs.
299+
* @important This function is not used on long UUIDs.
300300
*
301301
* @return The value of the shortened UUID.
302302
*/

0 commit comments

Comments
 (0)