Files
E3-20260112-pitch/20250218-ETH-CAN_loadV1.3/e3_176_ref/middleware/checksum/crc32.h
2026-01-12 18:46:01 +08:00

25 lines
673 B
C

/**
* @file crc32.h
*
* Copyright (c) 2021 Semidrive Semiconductor.
* All rights reserved.
*/
#ifndef __CRC32_H
#define __CRC32_H
/**
* @brief Calculate the CRC-32 checksum for a given data buffer.This function
* uses a predefined CRC-32 table to compute the CRC-32 checksum of the input
* data buffer.
*
* @param crc Initial CRC value, typically 0.
* @param buf Pointer to the unsigned character data buffer for which the CRC-32
* is to be calculated.
* @param len Length of the data buffer in bytes.
* @return The computed CRC-32 checksum.
*/
unsigned long crc32(unsigned long crc, const unsigned char *buf,
unsigned int len);
#endif