mirror of
https://gitee.com/Armink/EasyFlash.git
synced 2024-11-29 18:57:41 +08:00
1、【完善】CRC32 计算代码,使其更好的支持 C++ 语言。
Signed-off-by: armink <armink.ztl@gmail.com>
This commit is contained in:
parent
08789adb9c
commit
cf69742163
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the EasyFlash Library.
|
* This file is part of the EasyFlash Library.
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015, Armink, <armink.ztl@gmail.com>
|
* Copyright (c) 2015-2016, Armink, <armink.ztl@gmail.com>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
* Permission is hereby granted, free of charge, to any person obtaining
|
||||||
* a copy of this software and associated documentation files (the
|
* a copy of this software and associated documentation files (the
|
||||||
@ -88,7 +88,7 @@ uint32_t ef_calc_crc32(uint32_t crc, const void *buf, size_t size)
|
|||||||
{
|
{
|
||||||
const uint8_t *p;
|
const uint8_t *p;
|
||||||
|
|
||||||
p = buf;
|
p = (const uint8_t *)buf;
|
||||||
crc = crc ^ ~0U;
|
crc = crc ^ ~0U;
|
||||||
|
|
||||||
while (size--) {
|
while (size--) {
|
||||||
|
Loading…
Reference in New Issue
Block a user