mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 12:16:31 +00:00
crc库(#46)
* crc * 更改crc7 * add crc.h,crc.md * 调整文件编码格式 * 调整文档 Co-authored-by: fslongjin <longjin@RinGoTek.cn>
This commit is contained in:
@ -353,3 +353,36 @@
|
||||
**size**
|
||||
|
||||
  待拷贝的数据大小
|
||||
|
||||
## 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)`**
|
||||
|
||||
### 描述
|
||||
|
||||
  用于计算循环冗余校验码
|
||||
|
||||
### 参数说明
|
||||
|
||||
**crc**
|
||||
|
||||
  传入的CRC初始值
|
||||
|
||||
**buffer**
|
||||
|
||||
  待处理的数据缓冲区
|
||||
|
||||
**len**
|
||||
|
||||
  缓冲区大小(字节)
|
||||
|
||||
|
Reference in New Issue
Block a user