File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -99,8 +99,7 @@ template <uint32_t polynomial = POLY_32BIT_ANSI, uint8_t width = 32>
99
99
class MbedCRC {
100
100
101
101
public:
102
- enum CrcMode
103
- {
102
+ enum CrcMode {
104
103
#ifdef DEVICE_CRC
105
104
HARDWARE = 0 ,
106
105
#endif
@@ -165,7 +164,7 @@ class MbedCRC {
165
164
166
165
status = compute_partial_stop (crc);
167
166
if (0 != status) {
168
- *crc = 0 ;
167
+ *crc = 0 ;
169
168
}
170
169
171
170
return status;
@@ -312,7 +311,7 @@ class MbedCRC {
312
311
313
312
/* * Acquire exclusive access to CRC hardware/software
314
313
*/
315
- void lock ()
314
+ void lock ()
316
315
{
317
316
#ifdef DEVICE_CRC
318
317
if (_mode == HARDWARE) {
@@ -483,8 +482,7 @@ class MbedCRC {
483
482
p_crc = (p_crc >> 4 ) ^ crc_table[(p_crc ^ (data[i] >> 0 )) & 0xf ];
484
483
p_crc = (p_crc >> 4 ) ^ crc_table[(p_crc ^ (data[i] >> 4 )) & 0xf ];
485
484
}
486
- }
487
- else {
485
+ } else {
488
486
for (crc_data_size_t byte = 0 ; byte < size; byte++) {
489
487
data_byte = reflect_bytes (data[byte]) ^ (p_crc >> (width - 8 ));
490
488
p_crc = crc_table[data_byte] ^ (p_crc << 8 );
You can’t perform that action at this time.
0 commit comments