Skip to content

Commit 824466d

Browse files
Amanda ButlerSteven Cartmell
authored andcommitted
Copy edit crc_api.h
Copy edit file, mostly for American spelling and consistent tense across files.
1 parent 804d050 commit 824466d

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

hal/crc_api.h

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -73,33 +73,33 @@ extern "C" {
7373
*
7474
* Supported polynomials are restricted to the named polynomials that can be
7575
* constructed in the MbedCRC class, POLY_8BIT_CCITT, POLY_7BIT_SD,
76-
* POLY_16BIT_CCITT, POLY_16BIT_IBM, POLY_32BIT_ANSI.
76+
* POLY_16BIT_CCITT, POLY_16BIT_IBM and POLY_32BIT_ANSI.
7777
*
7878
* The current platform must support the given polynomials default parameters
79-
* in order to return a true response, these include: reflect in, reflect out,
80-
* initial xor, and final xor. For example POLY_32BIT_ANSI requires an initial
79+
* in order to return a true response. These include: reflect in, reflect out,
80+
* initial xor and final xor. For example, POLY_32BIT_ANSI requires an initial
8181
* and final xor of 0xFFFFFFFF, and reflection of both input and output. If any
82-
* of these settings cannot be configured the polynomial is not supported.
82+
* of these settings cannot be configured, the polynomial is not supported.
8383
*
84-
* This function is thread safe, it safe to call from multiple contexts if
84+
* This function is thread safe; it safe to call from multiple contexts if
8585
* required.
8686
*
87-
* \param config Contains CRC configuration parameters for initialising the
87+
* \param config Contains CRC configuration parameters for initializing the
8888
* hardware CRC module. For example, polynomial and initial seed
8989
* values.
9090
*
9191
* \return True if running if the polynomial is supported, false if not.
9292
*/
9393
bool hal_crc_is_supported(const crc_mbed_config_t* config);
9494

95-
/** Initialise the hardware CRC module with the given polynomial
95+
/** Initialize the hardware CRC module with the given polynomial
9696
*
97-
* After calling this function the CRC HAL module will be ready to receive data
97+
* After calling this function, the CRC HAL module is ready to receive data
9898
* using the hal_crc_compute_partial() function. The CRC module on the board
99-
* will be configured internally with the specified configuration and be ready
99+
* is configured internally with the specified configuration and is ready
100100
* to receive data.
101101
*
102-
* The platform will configure itself based on the default configuration
102+
* The platform configures itself based on the default configuration
103103
* parameters of the input polynomial.
104104
*
105105
* This function must be called before calling hal_crc_compute_partial().
@@ -108,17 +108,17 @@ bool hal_crc_is_supported(const crc_mbed_config_t* config);
108108
* platform. The polynomial must be checked for support using the
109109
* hal_crc_is_supported() function.
110110
*
111-
* Calling hal_crc_compute_partial_start() multiple times without finalising the
112-
* CRC calculation with hal_crc_get_result() will override the current
113-
* configuration and state and the intermediate result of the computation will
114-
* be lost.
111+
* Calling hal_crc_compute_partial_start() multiple times without finalizing the
112+
* CRC calculation with hal_crc_get_result() overrides the current
113+
* configuration and state, and the intermediate result of the computation is
114+
* lost.
115115
*
116-
* This function is not thread safe, a CRC calculation must not be started from
117-
* two different threads or contexts at the same time, calling this function
116+
* This function is not thread safe. A CRC calculation must not be started from
117+
* two different threads or contexts at the same time; calling this function
118118
* from two different contexts may lead to configurations being overwritten and
119119
* results being lost.
120120
*
121-
* \param config Contains CRC configuration parameters for initialising the
121+
* \param config Contains CRC configuration parameters for initializing the
122122
* hardware CRC module. For example, polynomial and initial seed
123123
* values.
124124
*/
@@ -129,22 +129,22 @@ void hal_crc_compute_partial_start(const crc_mbed_config_t* config);
129129
* Writes input data buffer bytes to the CRC data register. The CRC module
130130
* must interpret the data as an array of bytes.
131131
*
132-
* The final transformations are not applied to the data, the CRC module must
132+
* The final transformations are not applied to the data; the CRC module must
133133
* retain the intermediate result so that additional calls to this function
134134
* can be made, appending the additional data to the calculation.
135135
*
136-
* To obtain the final result of the CRC calculation hal_crc_get_result() is
136+
* To obtain the final result of the CRC calculation, hal_crc_get_result() is
137137
* called to apply the final transformations to the data.
138138
*
139139
* If the function is passed an undefined pointer, or the size of the buffer is
140-
* specified to be 0, this function will do nothing and return.
140+
* specified to be 0, this function does nothing and returns.
141141
*
142-
* This function can be call multiple times in succession, this can be used
142+
* This function can be called multiple times in succession. This can be used
143143
* to calculate the CRC result of streamed data.
144144
*
145145
* This function is not thread safe. There is only one instance of the CRC
146-
* module active at a time, calling this function from multiple contexts will
147-
* append different data to the same, single instance of the module causing an
146+
* module active at a time. Calling this function from multiple contexts
147+
* appends different data to the same, single instance of the module, which causes an
148148
* erroneous value to be calculated.
149149
*
150150
* \param data Input data stream to be written into the CRC calculation
@@ -160,16 +160,16 @@ void hal_crc_compute_partial(const uint8_t *data, const size_t size);
160160
*
161161
* Additional transformations that are used in the default configuration of the
162162
* input polynomial are applied to the result before it is returned from this
163-
* function, these transformations include: The final xor being appended to the
163+
* function. These transformations include: the final xor being appended to the
164164
* calculation, and the result being reflected if required.
165165
*
166166
* Calling this function multiple times is undefined. The first call to this
167-
* function will return the final result of the CRC calculation, the return
168-
* value on successive calls is undefined as the contents of the register after
167+
* function returns the final result of the CRC calculation. The return
168+
* value on successive calls is undefined because the contents of the register after
169169
* accessing them is platform-specific.
170170
*
171171
* This function is not thread safe. There is only one instance of the CRC
172-
* module active at a time, calling this function from multiple contexts may
172+
* module active at a time. Calling this function from multiple contexts may
173173
* return incorrect data or affect the current state of the module.
174174
*
175175
* \return The final CRC checksum after the reflections and final calculations

0 commit comments

Comments
 (0)