lib: crc: address absence of crc4, crc4_ti in crc_types array

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 <pisit@ndrsolution.com>
This commit is contained in:
Pisit Sawangvonganan 2023-12-23 13:50:33 +07:00 committed by Carles Cufí
parent 8f97c1c2ee
commit b8184ca3b7
1 changed files with 3 additions and 1 deletions

View File

@ -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",