zephyr/samples
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 cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
arch lib: os: crc: Rework the crc16() implementation 2022-02-04 12:33:22 -05:00
basic samples: blinky: use a gpio_dt_spec 2022-02-04 11:20:46 +01:00
bluetooth samples: Bluetooth: df: Remove dep on CTLR Kconf in sample sources 2022-02-03 14:57:17 +01:00
boards samples: boards: nrf: Add nrf53_sync_rtc sample 2022-01-19 17:46:28 +01:00
compression samples/compression/l4z: Increase min_ram 2022-01-28 10:07:00 +01:00
drivers samples: drivers: adc: Add a device tree overlay for atsamd21_xpro 2022-02-04 10:49:09 +01:00
hello_world tests: uefi: move uefi test out of hello world 2021-10-22 06:36:51 -04:00
kernel tests: kernel: cycle64: mark test as slow 2021-11-29 10:35:49 -05:00
modules samples: modules: canopennode: Fix example code 2022-01-28 10:05:58 +01:00
net kernel: workq: Fix type errors in delayable work handlers 2022-02-02 18:43:12 -05:00
philosophers samples: fix wrong extra_args definitions 2022-01-04 17:15:06 -05:00
posix samples/posix: eventfd: Prevent run in twister when SRAM below 32K 2021-09-20 19:48:34 -04:00
sensor sensors: STM32: Add support for L5 die temp sensor 2022-01-13 10:34:10 +01:00
shields drivers: sensor: Const sensor trigger data in trigger handler 2021-10-27 15:09:35 -04:00
subsys samples: logging/syst: expand to doing v1/v2 immediate/deferred 2022-02-04 11:14:55 +01:00
synchronization cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
tfm_integration modules: trusted-firmware-m: Use TF-M install headers as interface 2022-02-01 11:31:36 +01:00
userspace boards/intel_adsp_cavs25: Improve test coverage 2022-01-21 14:36:49 -05:00
classic.rst
index.rst