uboot/lib
Stefan Roese 456ecd08ec lib/crc8: Add crc start value
To make the usage of this function more flexible, lets add the CRC start
value as parameter to this function. This way it can be used by other
functions requiring different start values than 0 as well.

For non-zero CRC start values to work, I've reworked the function a bit.
The new implementation is copied from the Linux version in
drivers/i2c/i2c-core.c / i2c_smbus_pec(). Which supports non-zero
CRC stating values.

I've double-checked that the results for zero starting values are
identical to the results from the original version of this function.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-04-11 20:48:26 -04:00
..
bzip2
dhry
efi
efi_loader
libfdt
lzma
lzo
rsa
tizen
zlib
Kconfig
Makefile
addr_map.c
aes.c
asm-offsets.c
bch.c
bitrev.c
circbuf.c
crc7.c
crc8.c
crc16.c
crc32.c
ctype.c
display_options.c
div64.c
errno.c
errno_str.c
fdtdec.c
fdtdec_common.c
fdtdec_test.c
gunzip.c
gzip.c
hang.c
hashtable.c
initcall.c
ldiv.c
linux_compat.c
linux_string.c
list_sort.c
lmb.c
lz4.c
lz4_wrapper.c
md5.c
membuff.c
net_utils.c
panic.c
physmem.c
qsort.c
rand.c
rbtree.c
rc4.c
sha1.c
sha256.c
slre.c
string.c
strmhz.c
strto.c
time.c
tiny-printf.c
tpm.c
trace.c
uuid.c
vsprintf.c