mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-09 20:45:41 +08:00
为n32g45x添加硬件CRC支持 (#5852)
* 为n32g45x添加硬件CRC支持 基于stm32的驱动文件进行改造,目前modbus的crc16和mpeg2的crc32测试正常
This commit is contained in:
1 parent
6ce4a87492
commit
d77125452b
3 files changed
+455
-1
No files matched your search
@@ -57,7 +57,10 @@ if GetDepend(['BSP_USING_CAN']):
|
||||
|
||||
if GetDepend(['BSP_USING_SDIO']):
|
||||
src += ['drv_sdio.c']
|
||||
|
||||
|
||||
if GetDepend(['RT_USING_HWCRYPTO']):
|
||||
src += ['drv_crypto.c']
|
||||
|
||||
CPPPATH = [cwd]
|
||||
|
||||
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* 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_ */
|
||||
Reference in new issue
Block a user