#ifndef BOOT_CRC_H #define BOOT_CRC_H #include /* CRC32(zlib 参数):支持流式(NOR 分块读入)与一次性两种用法 */ uint32_t boot_crc32_init(void); uint32_t boot_crc32_update(uint32_t crc, const uint8_t *buf, uint32_t len); uint32_t boot_crc32_finish(uint32_t crc); uint32_t boot_crc32(const uint8_t *buf, uint32_t len); /* Boot 状态记录保护 CRC-16/CCITT-FALSE */ uint16_t boot_crc16_ccitt(const uint8_t *buf, uint32_t len); /* YMODEM 块 CRC-16/XMODEM(init=0) */ uint16_t boot_ymodem_crc16(const uint8_t *buf, uint32_t len); #endif /* BOOT_CRC_H */