Mustang cbbf79b2cf
crc库(#46)
* crc

* 更改crc7

* add crc.h,crc.md

* 调整文件编码格式

* 调整文档

Co-authored-by: fslongjin <longjin@RinGoTek.cn>
2022-09-20 15:12:45 +08:00

12 lines
263 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <common/sys/types.h>
/**
* @brief 计算crc16
*
* @param crc crc初始值
* @param buffer 输入缓冲区
* @param len buffer大小bytes
* @return uint16_t crc
*/
uint16_t crc16(uint16_t crc, const uint8_t *buffer, size_t len);