File tree Expand file tree Collapse file tree 1 file changed +13
-16
lines changed Expand file tree Collapse file tree 1 file changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -514,22 +514,19 @@ class MbedCRC {
514
514
MBED_STATIC_ASSERT (width <= 32 , " Max 32-bit CRC supported" );
515
515
516
516
#if DEVICE_CRC
517
- if (POLY_32BIT_REV_ANSI == polynomial) {
518
- _crc_table = (uint32_t *)Table_CRC_32bit_Rev_ANSI;
519
- _mode = TABLE;
520
- return ;
521
- }
522
- crc_mbed_config_t config;
523
- config.polynomial = polynomial;
524
- config.width = width;
525
- config.initial_xor = _initial_value;
526
- config.final_xor = _final_xor;
527
- config.reflect_in = _reflect_data;
528
- config.reflect_out = _reflect_remainder;
529
-
530
- if (hal_crc_is_supported (&config)) {
531
- _mode = HARDWARE;
532
- return ;
517
+ if (POLY_32BIT_REV_ANSI != polynomial) {
518
+ crc_mbed_config_t config;
519
+ config.polynomial = polynomial;
520
+ config.width = width;
521
+ config.initial_xor = _initial_value;
522
+ config.final_xor = _final_xor;
523
+ config.reflect_in = _reflect_data;
524
+ config.reflect_out = _reflect_remainder;
525
+
526
+ if (hal_crc_is_supported (&config)) {
527
+ _mode = HARDWARE;
528
+ return ;
529
+ }
533
530
}
534
531
#endif
535
532
You can’t perform that action at this time.
0 commit comments