This commit is contained in:
kidneygood
2022-11-18 22:06:06 +08:00
parent 613939fe23
commit 611db0ded1
8 changed files with 716 additions and 3 deletions

18
modules/referee/crc.h Normal file
View File

@@ -0,0 +1,18 @@
#ifndef __CRC_H_
#define __CRC_H_
#include "struct_typedef.h"
#define TRUE 1
#define FALSE 0
// CRC8
void Append_CRC8_Check_Sum( uint8_t *pchMessage, uint16_t dwLength);
uint32_t Verify_CRC8_Check_Sum( uint8_t *pchMessage, uint16_t dwLength);
uint8_t Get_CRC8_Check_Sum( uint8_t *pchMessage, uint16_t dwLength, uint8_t ucCRC8 );
// CRC16
void Append_CRC16_Check_Sum(uint8_t * pchMessage,uint32_t dwLength);
uint32_t Verify_CRC16_Check_Sum(uint8_t *pchMessage, uint32_t dwLength);
uint16_t Get_CRC16_Check_Sum(uint8_t *pchMessage,uint32_t dwLength,uint16_t wCRC);
#endif