1 #pragma once 2 #include <common/sys/types.h> 3 4 /** 5 * @brief 计算crc16 6 * 7 * @param crc crc初始值 8 * @param buffer 输入缓冲区 9 * @param len buffer大小(bytes) 10 * @return uint16_t crc 11 */ 12 uint16_t crc16(uint16_t crc, const uint8_t *buffer, size_t len);