nuttx/libs/libc/misc
yukangzhi 31b0d79b44 libs/crc: implement AUTOSAR-compatible CRC algorithm
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>
2026-01-30 17:32:15 +08:00
..
CMakeLists.txt libs/crc: implement AUTOSAR-compatible CRC algorithm 2026-01-30 17:32:15 +08:00
Kconfig libc/misc: fix typo error about misc/Kconfig 2025-05-14 15:02:17 +08:00
lib_backtrace.c lib/backtrace:need init lock before use 2025-12-22 15:23:04 +08:00
lib_bitmap.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
lib_circbuf.c
lib_crc8.c
lib_crc8ccitt.c
lib_crc8h1d.c libs/crc: implement AUTOSAR-compatible CRC algorithm 2026-01-30 17:32:15 +08:00
lib_crc8h2f.c libs/crc: implement AUTOSAR-compatible CRC algorithm 2026-01-30 17:32:15 +08:00
lib_crc8rohc.c libc/crc: Add crc8rohcincr for incremental CRC8 ROHC calculation 2025-09-30 17:30:46 -03:00
lib_crc8table.c
lib_crc16.c libs/libc/crc16: Separate implementation of crc16xmodem from crc16 2025-04-10 16:47:28 +08:00
lib_crc16ccitt.c libs/libc/crc16: move crc16 table to rodata 2025-04-07 09:02:01 +08:00
lib_crc16h1021.c libs/crc: implement AUTOSAR-compatible CRC algorithm 2026-01-30 17:32:15 +08:00
lib_crc16h8005.c libs/crc: implement AUTOSAR-compatible CRC algorithm 2026-01-30 17:32:15 +08:00
lib_crc16ibm.c libs/libc/crc16: add support of CRC-16/ANSI(aka CRC-16/IBM) 2025-04-07 12:10:05 +08:00
lib_crc16xmodem.c libs/libc/crc16: Separate implementation of crc16xmodem from crc16 2025-04-10 16:47:28 +08:00
lib_crc32.c libc/arm: optimize crc32/crc32c for arm 2025-04-04 09:51:50 -03:00
lib_crc32h04c11db7.c libs/crc: implement AUTOSAR-compatible CRC algorithm 2026-01-30 17:32:15 +08:00
lib_crc32hf4acfb13.c libs/crc: implement AUTOSAR-compatible CRC algorithm 2026-01-30 17:32:15 +08:00
lib_crc64.c
lib_crc64emac.c libs/crc: implement AUTOSAR-compatible CRC algorithm 2026-01-30 17:32:15 +08:00
lib_creat.c libc: add creat function implementation 2026-01-16 01:38:20 +08:00
lib_cxx_initialize.c
lib_debug.c
lib_dumpbuffer.c
lib_dumpvbuffer.c
lib_envpath.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
lib_err.c
lib_fchmodat.c
lib_fdcheck.c libc/fdcheck: cause system to panic when a double close occurs 2025-05-14 15:02:17 +08:00
lib_fdsan.c
lib_fnmatch.c
lib_fstatat.c
lib_ftok.c libs/libc/ftok: fix sizeof(char *), after tempbuffer 2026-01-13 01:59:58 +08:00
lib_getfullpath.c
lib_getnprocs.c
lib_getrandom.c
lib_glob.c libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
lib_idr.c libc/idr: Remove nodes from RB trees during destroy 2025-07-12 14:24:32 +08:00
lib_impure.c
lib_instrument.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
lib_kbddecode.c
lib_kbdencode.c
lib_mallopt.c
lib_memfd.c libc/shmfs: Ensure uniqueness of memfd. 2026-01-22 22:11:17 +08:00
lib_mkdirat.c
lib_mkfifo.c
lib_mknod.c
lib_mutex.c Clean up the nxmutex library 2025-05-08 16:00:05 +08:00
lib_ncompress.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
lib_note.c driver/note: Fix compilation error when CONFIG_SYSLOG_TO_SCHED_NOTE=y 2026-01-23 07:48:08 -03:00
lib_openat.c
lib_slcddecode.c
lib_slcdencode.c
lib_tea_decrypt.c
lib_tea_encrypt.c
lib_tempbuffer.c
lib_uadd32x64.c
lib_uadd64.c
lib_umask.c
lib_umul32.c
lib_umul32x64.c
lib_umul64.c
lib_usub64.c
lib_usub64x32.c
lib_utimensat.c
lib_utsname.c
lib_xorshift128.c
Make.defs libs/crc: implement AUTOSAR-compatible CRC algorithm 2026-01-30 17:32:15 +08:00