mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-20 14:16:33 +00:00
crc库(#46)
* crc * 更改crc7 * add crc.h,crc.md * 调整文件编码格式 * 调整文档 Co-authored-by: fslongjin <longjin@RinGoTek.cn>
This commit is contained in:
12
kernel/common/crc32.h
Normal file
12
kernel/common/crc32.h
Normal file
@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include <common/sys/types.h>
|
||||
|
||||
/**
|
||||
* @brief 计算crc32
|
||||
*
|
||||
* @param crc crc初始值
|
||||
* @param buffer 输入缓冲区
|
||||
* @param len buffer大小(bytes)
|
||||
* @return uint32_t crc
|
||||
*/
|
||||
uint32_t crc32(uint32_t crc, const uint8_t *buffer, size_t len);
|
Reference in New Issue
Block a user