CELIS/UDS/crc.h
lidun 1e7070334c
增加UDS升级功能
Signed-off-by: lidun <1084178170@qq.com>
2024-01-28 22:06:01 +08:00

18 lines
516 B
C

#ifndef _CRC_H
#define _CRC_H
#include "sys.h"
uint32_t crc32( uint8_t *buf, int len); //crc32 ʵÏÖº¯Êý
uint32_t crc32MultSegment( uint8_t *seg1, int len1, uint8_t *seg2, int len2);
void CalcCheckSum(uint32_t *sum, uint8_t *data, uint32_t size);
void CRC16_CCITT_1021_Init(uint16_t *crc);
void CRC16_CCITT_1021_Update(uint16_t *crc, uint8_t *pData ,uint32_t len);
uint32_t CRC16_DataCheck( const u8 *pData, u32 size );
uint32_t CRC_Cal16_WithCfg( const uint8_t *pData, uint32_t size);
#endif