* crc

* 更改crc7

* add crc.h,crc.md

* 调整文件编码格式

* 调整文档

Co-authored-by: fslongjin <longjin@RinGoTek.cn>
This commit is contained in:
Mustang
2022-09-20 15:12:45 +08:00
committed by GitHub
parent 7598f63383
commit cbbf79b2cf
11 changed files with 326 additions and 0 deletions

View File

@ -353,3 +353,36 @@
**size**
&emsp;&emsp;待拷贝的数据大小
## CRC函数
### 函数列表
**`uint8_t crc7(uint8_t crc, const uint8_t *buffer, size_t len)`**
**`uint8_t crc8(uint8_t crc, const uint8_t *buffer, size_t len)`**
**`uint16_t crc16(uint16_t crc, uint8_t const *buffer, size_t len)`**
**`uint32_t crc32(uint32_t crc, uint8_t const *buffer, size_t len)`**
**`uint64_t crc64(uint64_t crc, uint8_t const *buffer, size_t len)`**
### 描述
&emsp;&emsp;用于计算循环冗余校验码
### 参数说明
**crc**
&emsp;&emsp;传入的CRC初始值
**buffer**
&emsp;&emsp;待处理的数据缓冲区
**len**
&emsp;&emsp;缓冲区大小字节