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
258 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 计算crc8
*
* @param crc crc初始值
* @param buffer 输入缓冲区
* @param len buffer大小bytes
* @return uint8_t crc
*/
uint8_t crc8(uint8_t crc, const uint8_t *buffer, size_t len);