mirror of
https://gitee.com/dlmu-cone/tronone-h7-scaffold
synced 2026-07-24 03:27:45 +08:00
CAN CAN NEED
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef BSP_CAN_H
|
||||
#define BSP_CAN_H
|
||||
#ifndef BSP_FDCAN_H
|
||||
#define BSP_FDCAN_H
|
||||
|
||||
//在此选择CAN类型,两者只能选择一个!!!
|
||||
#define FDCAN //G系列和H7系列使用FDCAN
|
||||
@@ -34,7 +34,18 @@
|
||||
// 如果只有1个CAN,还需要把bsp_can.c中所有的hcan2变量改为hcan1(别担心,主要是总线和FIFO的负载均衡,不影响功能)
|
||||
#endif
|
||||
|
||||
|
||||
// 定义查找表
|
||||
static const uint32_t DLC_LookUp_Table[9] = {
|
||||
FDCAN_DLC_BYTES_0,
|
||||
FDCAN_DLC_BYTES_1,
|
||||
FDCAN_DLC_BYTES_2,
|
||||
FDCAN_DLC_BYTES_3,
|
||||
FDCAN_DLC_BYTES_4,
|
||||
FDCAN_DLC_BYTES_5,
|
||||
FDCAN_DLC_BYTES_6,
|
||||
FDCAN_DLC_BYTES_7,
|
||||
FDCAN_DLC_BYTES_8
|
||||
};
|
||||
|
||||
/* can instance typedef, every module registered to CAN should have this variable */
|
||||
#pragma pack(1)
|
||||
|
||||
Reference in New Issue
Block a user