R2_UP/User/bsp/crc16.h

20 lines
320 B
C
Raw Normal View History

2025-03-12 10:46:02 +08:00
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include "user_math.h"
#define CRC16_INIT 0XFFFF
uint16_t CRC16_Calc(const uint8_t *buf, size_t len, uint16_t crc);
bool CRC16_Verify(const uint8_t *buf, size_t len);
2025-03-13 19:07:44 +08:00
uint16_t do_crc_table(uint8_t *ptr, int len);
2025-03-12 10:46:02 +08:00
#ifdef __cplusplus
}
#endif