Skip to content

Commit bdf0cbb

Browse files
author
Amanda Butler
authored
Copy edit GapAdvertisingData.h
Copy edit file.
1 parent 6f7f5ae commit bdf0cbb

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

features/FEATURE_BLE/ble/GapAdvertisingData.h

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@
3535
* GAP advertising data builder.
3636
*
3737
* Advertising data are used by broadcaster or peripheral to advertise state
38-
* about the device. This class offers function to add and update states present
38+
* about the device. This class offers the function to add and update states present
3939
* in an advertisement payload.
4040
*
41-
* After construction the advertising payload contained in instance of
42-
* GapAdvertisingData is empty. Adding new states also named fields can be
43-
* achieved by invoking the function addData() while updating existing state
44-
* involve calling the function updateData().
41+
* After construction, the advertising payload contained in the instance of
42+
* GapAdvertisingData is empty. Adding new states and named fields can be
43+
* achieved by invoking the function addData(), and updating existing state
44+
* involves calling the function updateData().
4545
*
4646
* Fields present in the payload can be retrieved by a call to the function
4747
* findField.
4848
*
4949
* This class includes shorthand for the most common fields:
50-
* - FLAGS: addFlags()
51-
* - APPEARANCE: addAppearance()
52-
* - TX_POWER_LEVEL: addTxPower()
50+
* - FLAGS: addFlags().
51+
* - APPEARANCE: addAppearance().
52+
* - TX_POWER_LEVEL: addTxPower().
5353
*
5454
* @code
5555
*
@@ -79,16 +79,16 @@
7979
* @endcode
8080
*
8181
* @note See Bluetooth Specification 4.0 (Vol. 3), Part C, Sections 11 and 18
82-
* for further information on Advertising and Scan Response data.
82+
* for further information on advertising and scan response data.
8383
*
8484
* @par Advertising and Scan Response Payloads
85-
* Advertising data and Scan Response data are organized around a set of
85+
* Advertising data and scan response data are organized around a set of
8686
* data types called 'AD types' in Bluetooth 4.0 (see the Bluetooth Core
8787
* Specification v4.0, Vol. 3, Part C, Sections 11 and 18).
8888
*
8989
* @par
90-
* Each AD type has its own standardized assigned number, as defined
91-
* by the Bluetooth SIG:
90+
* Each AD type has its own standardized assigned number, as
91+
* the Bluetooth SIG defines:
9292
* https://www.bluetooth.org/en-us/specification/assigned-numbers/generic-access-profile.
9393
*
9494
* @par
@@ -97,7 +97,7 @@
9797
*
9898
* @par
9999
* Before the AD Types and their payload (if any) can be inserted into
100-
* the Advertising or Scan Response frames, they need to be formatted as
100+
* the advertising or scan response frames, they need to be formatted as
101101
* follows:
102102
*
103103
* @li @c Record length (1 byte).
@@ -106,17 +106,17 @@
106106
*
107107
* @par
108108
* This class takes care of properly formatting the payload, performs
109-
* some basic checks on the payload length, and tries to avoid common
110-
* errors like adding an exclusive AD field twice in the Advertising
111-
* or Scan Response payload.
109+
* some basic checks on the payload length and tries to avoid common
110+
* errors such as adding an exclusive AD field twice in the advertising
111+
* or scan response payload.
112112
*/
113113
class GapAdvertisingData
114114
{
115115
public:
116116
/*!
117117
* List of standard Advertising Data types.
118118
*
119-
* These AD types are used to describe the capabilities of the peripheral,
119+
* These AD types are used to describe the capabilities of the peripheral
120120
* and are inserted inside the advertising or scan response payloads.
121121
*
122122
* @par Source
@@ -186,7 +186,7 @@ class GapAdvertisingData
186186
SLAVE_CONNECTION_INTERVAL_RANGE = 0x12,
187187

188188
/**
189-
* List of 128 bit service UUIDs the device is looking for.
189+
* List of 128-bit service UUIDs the device is looking for.
190190
*/
191191
LIST_128BIT_SOLICITATION_IDS = 0x15,
192192

@@ -215,15 +215,15 @@ class GapAdvertisingData
215215
/**
216216
* Alias for GapAdvertisingData::DataType_t.
217217
*
218-
* @deprecated This type alias will be dropped in future releases.
218+
* @deprecated Future releases will drop this type alias.
219219
*/
220220
typedef enum DataType_t DataType;
221221

222222
/**
223223
* Enumeration of allowed flags for DataType_t::FLAGS.
224224
*
225-
* @note DataType_t::FLAGS may contain several flags assembled by the
226-
* bitwise and operator (ex.LE_GENERAL_DISCOVERABLE & BREDR_NOT_SUPPORTED).
225+
* @note DataType_t::FLAGS may contain several flags that the bitwise
226+
* and operator (ex.LE_GENERAL_DISCOVERABLE & BREDR_NOT_SUPPORTED) assembled.
227227
*
228228
* @par Source
229229
*
@@ -242,7 +242,7 @@ class GapAdvertisingData
242242

243243
/**
244244
* Peripheral device is LE only and does not support Bluetooth Enhanced
245-
* DataRate
245+
* DataRate.
246246
*/
247247
BREDR_NOT_SUPPORTED = 0x04,
248248

@@ -261,7 +261,7 @@ class GapAdvertisingData
261261
/**
262262
* Alias for GapAdvertisingData::Flags_t.
263263
*
264-
* @deprecated This type alias will be dropped in future releases.
264+
* @deprecated Future releases will drop this type alias.
265265
*/
266266
typedef enum Flags_t Flags;
267267

@@ -338,7 +338,7 @@ class GapAdvertisingData
338338
GENERIC_MEDIA_PLAYER = 640,
339339

340340
/**
341-
* Generic Barcode Scanner.
341+
* Generic Bar Code Scanner.
342342
*/
343343
GENERIC_BARCODE_SCANNER = 704,
344344

@@ -418,7 +418,7 @@ class GapAdvertisingData
418418
DIGITAL_PEN = 967,
419419

420420
/**
421-
* Barcode Scanner.
421+
* Bar Code Scanner.
422422
*/
423423
BARCODE_SCANNER = 968,
424424

@@ -527,7 +527,7 @@ class GapAdvertisingData
527527
/**
528528
* Alias for GapAdvertisingData::Appearance_t.
529529
*
530-
* @deprecated This type alias will be dropped in future releases.
530+
* @deprecated Future releases will drop this type alias.
531531
*/
532532
typedef enum Appearance_t Appearance;
533533

@@ -557,7 +557,7 @@ class GapAdvertisingData
557557
* @note When the specified data type is INCOMPLETE_LIST_16BIT_SERVICE_IDS,
558558
* COMPLETE_LIST_16BIT_SERVICE_IDS, INCOMPLETE_LIST_32BIT_SERVICE_IDS,
559559
* COMPLETE_LIST_32BIT_SERVICE_IDS, INCOMPLETE_LIST_128BIT_SERVICE_IDS,
560-
* COMPLETE_LIST_128BIT_SERVICE_IDS or LIST_128BIT_SOLICITATION_IDS the
560+
* COMPLETE_LIST_128BIT_SERVICE_IDS or LIST_128BIT_SOLICITATION_IDS, the
561561
* supplied value is appended to the values present in the payload.
562562
*/
563563
ble_error_t addData(DataType_t advDataType, const uint8_t *payload, uint8_t len)
@@ -566,10 +566,10 @@ class GapAdvertisingData
566566
uint8_t* field = findField(advDataType);
567567

568568
if (field) {
569-
/* Field type already exist, either add to field or replace */
569+
/* Field type already exists, either add to field or replace */
570570
return addField(advDataType, payload, len, field);
571571
} else {
572-
/* Field doesn't exists, insert new */
572+
/* Field doesn't exist, insert new */
573573
return appendField(advDataType, payload, len);
574574
}
575575
}
@@ -592,10 +592,10 @@ class GapAdvertisingData
592592
uint8_t* field = findField(advDataType);
593593

594594
if (field) {
595-
/* Field type already exist, replace field contents */
595+
/* Field type already exists, replace field contents */
596596
return updateField(advDataType, payload, len, field);
597597
} else {
598-
/* field doesn't exists, return an error */
598+
/* field doesn't exist, return an error */
599599
return BLE_ERROR_UNSPECIFIED;
600600
}
601601
}
@@ -688,7 +688,7 @@ class GapAdvertisingData
688688
/**
689689
* Get the appearance set.
690690
*
691-
* If no value has been set this function returns GENERIC_TAG.
691+
* If no value has been set, this function returns GENERIC_TAG.
692692
*
693693
* @return The appearance value set for this device.
694694
*/
@@ -739,7 +739,7 @@ class GapAdvertisingData
739739
*/
740740
ble_error_t appendField(DataType advDataType, const uint8_t *payload, uint8_t len)
741741
{
742-
/* Make sure we don't exceed the 31 byte payload limit */
742+
/* Make sure we don't exceed the 31-byte payload limit */
743743
if (_payloadLen + len + 2 > GAP_ADVERTISING_DATA_MAX_PAYLOAD) {
744744
return BLE_ERROR_BUFFER_OVERFLOW;
745745
}
@@ -788,7 +788,7 @@ class GapAdvertisingData
788788
* @note When the specified AD type is INCOMPLETE_LIST_16BIT_SERVICE_IDS,
789789
* COMPLETE_LIST_16BIT_SERVICE_IDS, INCOMPLETE_LIST_32BIT_SERVICE_IDS,
790790
* COMPLETE_LIST_32BIT_SERVICE_IDS, INCOMPLETE_LIST_128BIT_SERVICE_IDS,
791-
* COMPLETE_LIST_128BIT_SERVICE_IDS or LIST_128BIT_SOLICITATION_IDS the
791+
* COMPLETE_LIST_128BIT_SERVICE_IDS or LIST_128BIT_SOLICITATION_IDS, the
792792
* supplied value is appended to the values previously added to the
793793
* payload.
794794
*
@@ -803,7 +803,7 @@ class GapAdvertisingData
803803
ble_error_t result = BLE_ERROR_BUFFER_OVERFLOW;
804804

805805
switch(advDataType) {
806-
/* These fields will have the new data appended if there is sufficient space */
806+
/* These fields have the new data appended if there is sufficient space. */
807807
case INCOMPLETE_LIST_16BIT_SERVICE_IDS:
808808
case COMPLETE_LIST_16BIT_SERVICE_IDS:
809809
case INCOMPLETE_LIST_32BIT_SERVICE_IDS:
@@ -839,7 +839,7 @@ class GapAdvertisingData
839839

840840
break;
841841
}
842-
/* These fields will be overwritten with the new value */
842+
/* These fields are overwritten with the new value */
843843
default: {
844844
result = updateField(advDataType, payload, len, field);
845845

@@ -900,7 +900,7 @@ class GapAdvertisingData
900900
}
901901

902902
/**
903-
* Advertising data buffer
903+
* Advertising data buffer.
904904
*/
905905
uint8_t _payload[GAP_ADVERTISING_DATA_MAX_PAYLOAD];
906906

0 commit comments

Comments
 (0)