Skip to content

Commit 5847f0c

Browse files
author
Steven Cartmell
committed
Fix CRC class coding conventions
1 parent fd8b974 commit 5847f0c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/MbedCRC.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ template <uint32_t polynomial=POLY_32BIT_ANSI, uint8_t width=32>
9494
class MbedCRC
9595
{
9696
public:
97-
enum crc_mode { HARDWARE = 0, TABLE, BITWISE };
97+
enum CrcMode { HARDWARE = 0, TABLE, BITWISE };
9898

9999
public:
100100
typedef uint64_t crc_data_size_t;
@@ -168,7 +168,7 @@ class MbedCRC
168168
*/
169169
int32_t compute_partial(void *buffer, crc_data_size_t size, uint32_t *crc)
170170
{
171-
switch (mode_)
171+
switch (_mode)
172172
{
173173
case HARDWARE:
174174
#ifdef DEVICE_CRC
@@ -200,7 +200,7 @@ class MbedCRC
200200
MBED_ASSERT(crc != NULL);
201201

202202
#ifdef DEVICE_CRC
203-
if (mode_ == HARDWARE) {
203+
if (_mode == HARDWARE) {
204204
hal_crc_compute_partial_start(polynomial);
205205
}
206206
#endif // DEVICE_CRC
@@ -221,7 +221,7 @@ class MbedCRC
221221
{
222222
MBED_ASSERT(crc != NULL);
223223

224-
if (mode_ == HARDWARE) {
224+
if (_mode == HARDWARE) {
225225
#ifdef DEVICE_CRC
226226
*crc = hal_crc_get_result();
227227
return 0;
@@ -262,7 +262,7 @@ class MbedCRC
262262
bool _reflect_data;
263263
bool _reflect_remainder;
264264
uint32_t *_crc_table;
265-
crc_mode mode_;
265+
CrcMode _mode;
266266

267267
/** Get the current CRC data size
268268
*
@@ -428,11 +428,11 @@ class MbedCRC
428428
{
429429
MBED_STATIC_ASSERT(width <= 32, "Max 32-bit CRC supported");
430430

431-
mode_ = (_crc_table == NULL) ? TABLE : BITWISE;
431+
_mode = (_crc_table == NULL) ? TABLE : BITWISE;
432432

433433
#ifdef DEVICE_CRC
434434
if (hal_crc_is_supported(polynomial)) {
435-
mode_ = HARDWARE;
435+
_mode = HARDWARE;
436436
}
437437
#endif
438438
}

0 commit comments

Comments
 (0)