zephyr/tests
Carles Cufi 7f6524949a lib: os: crc: Rework the crc16() implementation
As described in #42403, there was an issue with the existing crc16_ansi()
implementation, since it was not calculating the CRC-16-ANSI (aka
CRC-16-MODBUS). This is because the  existing crc16() function only
supported non-reflected input and output (and the CRC-16-ANSI requires
reflection on both) and also it did not seem to support correctly inial
seeds different from 0x0000 (and, again, the CRC-16-ANSI requires 0xffff
as an initial seed).

This commit replaces the existing crc16() with a functional pair,
crc16() and crc16_reflect(), that also work with any poly, any initial seed
and allow to select whether reflection is performed.
It also adapts crc16_ansi() so that it actually returns the correct CRC.

Fixes #42403.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-02-04 12:33:22 -05:00
..
application_development/gen_inc_file cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
arch modules: trusted-firmware-m: Use TF-M install headers as interface 2022-02-01 11:31:36 +01:00
benchmarks pm: s/PM_DEVICE_(DT_(INST))_REF/PM_DEVICE_(DT_(INST))_GET 2022-01-18 12:14:06 -05:00
bluetooth Bluetooth: Audio: Fix timeout message in BabbleSim tests 2022-02-04 11:17:08 +01:00
boards tests: boards: intel_s1000_crb: fix k_sleep arguments 2022-01-31 15:25:42 -05:00
boot/uefi tests: uefi: move uefi test out of hello world 2021-10-22 06:36:51 -04:00
cmake/config_dir cmake: APPLICATION_CONFIG_DIR support implemented 2021-11-10 08:25:36 -05:00
crypto tests: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
drivers tests: Fix drivers tests tag 2022-02-02 09:21:07 -05:00
kernel test/kernel/mbox: Drop needless _1cpu_ from test cases 2022-01-26 13:34:45 -05:00
lib tests: lib: ring_buffer: Increase timeot 2022-01-26 14:39:12 -05:00
misc cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
net kernel: workq: Fix type errors in delayable work handlers 2022-02-02 18:43:12 -05:00
posix tests: lib: getopt 2022-01-06 21:26:59 +01:00
subsys shell: Add test for dictionary command 2022-02-04 11:14:21 +01:00
unit lib: os: crc: Rework the crc16() implementation 2022-02-04 12:33:22 -05:00
ztest tests: ztress: fix dependency on SMP 2022-01-12 14:13:21 -05:00