@@ -73,33 +73,33 @@ extern "C" {
73
73
*
74
74
* Supported polynomials are restricted to the named polynomials that can be
75
75
* 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.
77
77
*
78
78
* 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
81
81
* 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.
83
83
*
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
85
85
* required.
86
86
*
87
- * \param config Contains CRC configuration parameters for initialising the
87
+ * \param config Contains CRC configuration parameters for initializing the
88
88
* hardware CRC module. For example, polynomial and initial seed
89
89
* values.
90
90
*
91
91
* \return True if running if the polynomial is supported, false if not.
92
92
*/
93
93
bool hal_crc_is_supported (const crc_mbed_config_t * config );
94
94
95
- /** Initialise the hardware CRC module with the given polynomial
95
+ /** Initialize the hardware CRC module with the given polynomial
96
96
*
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
98
98
* 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
100
100
* to receive data.
101
101
*
102
- * The platform will configure itself based on the default configuration
102
+ * The platform configures itself based on the default configuration
103
103
* parameters of the input polynomial.
104
104
*
105
105
* 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);
108
108
* platform. The polynomial must be checked for support using the
109
109
* hal_crc_is_supported() function.
110
110
*
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.
115
115
*
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
118
118
* from two different contexts may lead to configurations being overwritten and
119
119
* results being lost.
120
120
*
121
- * \param config Contains CRC configuration parameters for initialising the
121
+ * \param config Contains CRC configuration parameters for initializing the
122
122
* hardware CRC module. For example, polynomial and initial seed
123
123
* values.
124
124
*/
@@ -129,22 +129,22 @@ void hal_crc_compute_partial_start(const crc_mbed_config_t* config);
129
129
* Writes input data buffer bytes to the CRC data register. The CRC module
130
130
* must interpret the data as an array of bytes.
131
131
*
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
133
133
* retain the intermediate result so that additional calls to this function
134
134
* can be made, appending the additional data to the calculation.
135
135
*
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
137
137
* called to apply the final transformations to the data.
138
138
*
139
139
* 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 .
141
141
*
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
143
143
* to calculate the CRC result of streamed data.
144
144
*
145
145
* 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
148
148
* erroneous value to be calculated.
149
149
*
150
150
* \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);
160
160
*
161
161
* Additional transformations that are used in the default configuration of the
162
162
* 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
164
164
* calculation, and the result being reflected if required.
165
165
*
166
166
* 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
169
169
* accessing them is platform-specific.
170
170
*
171
171
* 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
173
173
* return incorrect data or affect the current state of the module.
174
174
*
175
175
* \return The final CRC checksum after the reflections and final calculations
0 commit comments