Skip to content

Commit e9f9890

Browse files
committed
crc: fix crc mode coding style
1 parent e7acdc4 commit e9f9890

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/MbedCRC.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ template <uint32_t polynomial = POLY_32BIT_ANSI, uint8_t width = 32>
9999
class MbedCRC {
100100

101101
public:
102-
enum CrcMode
103-
{
102+
enum CrcMode {
104103
#ifdef DEVICE_CRC
105104
HARDWARE = 0,
106105
#endif
@@ -165,7 +164,7 @@ class MbedCRC {
165164

166165
status = compute_partial_stop(crc);
167166
if (0 != status) {
168-
*crc = 0;
167+
*crc = 0;
169168
}
170169

171170
return status;
@@ -312,7 +311,7 @@ class MbedCRC {
312311

313312
/** Acquire exclusive access to CRC hardware/software
314313
*/
315-
void lock()
314+
void lock()
316315
{
317316
#ifdef DEVICE_CRC
318317
if (_mode == HARDWARE) {
@@ -483,8 +482,7 @@ class MbedCRC {
483482
p_crc = (p_crc >> 4) ^ crc_table[(p_crc ^ (data[i] >> 0)) & 0xf];
484483
p_crc = (p_crc >> 4) ^ crc_table[(p_crc ^ (data[i] >> 4)) & 0xf];
485484
}
486-
}
487-
else {
485+
} else {
488486
for (crc_data_size_t byte = 0; byte < size; byte++) {
489487
data_byte = reflect_bytes(data[byte]) ^ (p_crc >> (width - 8));
490488
p_crc = crc_table[data_byte] ^ (p_crc << 8);

0 commit comments

Comments
 (0)