Skip to content

Commit

Permalink
lib: crc: address absence of crc4, crc4_ti in crc_types array
Browse files Browse the repository at this point in the history
Added CRC4 and CRC4_TI to the supported crc_types[] array.
On some SoCs, like ESP32-S3, missing values can cause hardfaults
due to attempts to access the zero address.

Signed-off-by: Pisit Sawangvonganan <[email protected]>
  • Loading branch information
ndrs-pst authored and carlescufi committed Jan 3, 2024
1 parent 8f97c1c commit b8184ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/crc/crc_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
#include <zephyr/sys/crc.h>

static const char *const crc_types[] = {
[CRC4] = "4",
[CRC4_TI] = "4_ti",
[CRC7_BE] = "7_be",
[CRC8] = "8",
[CRC8_CCITT] "8_ccitt",
[CRC8_CCITT] = "8_ccitt",
[CRC16] = "16",
[CRC16_ANSI] = "16_ansi",
[CRC16_CCITT] = "16_ccitt",
Expand Down

0 comments on commit b8184ca

Please sign in to comment.