lib: add crc7.

Used as a checksum on command messages when talking with MMC cards.

Implemented using the unwound bytewise implementation from
https://en.wikipedia.org/wiki/Computation_of_cyclic_redundancy_checks
which is a good mix of size and speed.

The API and naming matches lib/crc7.c in Linux.

Signed-off-by: Michael Hope <mlhx@google.com>
This commit is contained in:
Michael Hope 2018-02-11 18:07:39 +01:00 committed by Anas Nashif
commit bbafc36b1c
4 changed files with 70 additions and 2 deletions

View file

@ -1 +1 @@
zephyr_sources(crc32_sw.c crc16_sw.c crc8_sw.c)
zephyr_sources(crc32_sw.c crc16_sw.c crc8_sw.c crc7_sw.c)