mirror of
https://github.com/apache/nuttx.git
synced 2026-03-27 10:39:28 +08:00
This patch adds an AUTOSAR-style CRC library used by E2E functionality. It introduces multiple CRC variants (CRC8, CRC16, CRC32, CRC64) and the corresponding public headers and implementation files. Key changes: - Public headers: `include/nuttx/crc8.h`, `include/nuttx/crc16.h`, `include/nuttx/crc32.h`, `include/nuttx/crc64.h` with new APIs for specific polynomial variants and incremental (part) helpers. - Implementations added under `libs/libc/misc/` for several polynomials: - `lib_crc16h1021.c` (CRC-16 CCITT-FALSE) - `lib_crc16h8005.c` - `lib_crc32h04c11db7.c` - `lib_crc32hf4acfb13.c` - `lib_crc64emac.c` - `lib_crc8h1d.c` - `lib_crc8h2f.c` - Build files updated to include the new sources. This addition provides low-level CRC primitives required by higher-level protocols and test suites. Signed-off-by: yukangzhi <yukangzhi@xiaomi.com>