wolfJane d77125452b
为n32g45x添加硬件CRC支持 (#5852)
* 为n32g45x添加硬件CRC支持

基于stm32的驱动文件进行改造,目前modbus的crc16和mpeg2的crc32测试正常
2022-04-24 11:42:25 +08:00

36 lines
622 B
C

/*
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2022-04-21 wolfJane first version
*/
#ifndef __DRV_CRYPTO_H_
#define __DRV_CRYPTO_H_
#include <rtthread.h>
#include <rtdevice.h>
#include <n32g45x.h>
#ifdef __cplusplus
extern "C" {
#endif
#define CRC32_PLOY (0x04C11DB7)
#define CRC16_PLOY (0x8005)
struct n32_hwcrypto_device
{
struct rt_hwcrypto_device dev;
struct rt_mutex mutex;
};
#ifdef __cplusplus
}
#endif
#endif /* __DRV_CRYPTO_H_ */