/****************************************************************************** 版权所有 (C), 2018-2099, Radkil ****************************************************************************** 文 件 名 : bsp_CAN.h 版 本 号 : 初稿 作 者 : radkil 生成日期 : 2026年5月13日 最近修改 : 功能描述 : bsp_CAN.c 的头文件 修改历史 : 1.日 期 : 2026年5月13日 作 者 : radkil 修改内容 : 创建文件 ******************************************************************************/ /*----------------------------------------------* * 外部变量说明 * *----------------------------------------------*/ /*----------------------------------------------* * 外部函数原型说明 * *----------------------------------------------*/ /*----------------------------------------------* * 内部函数原型说明 * *----------------------------------------------*/ /*----------------------------------------------* * 全局变量 * *----------------------------------------------*/ /*----------------------------------------------* * 模块级变量 * *----------------------------------------------*/ /*----------------------------------------------* * 常量定义 * *----------------------------------------------*/ /*----------------------------------------------* * 宏定义 * *----------------------------------------------*/ #ifndef __BSP_CAN_H__ #define __BSP_CAN_H__ #ifdef __cplusplus #if __cplusplus extern "C"{ #endif #endif /* __cplusplus */ /*==============================================* * include header files * *----------------------------------------------*/ #include "bsp_config.h" #ifdef USE_CAN #include "main.h" #include "com.h" /*==============================================* * constants or macros define * *----------------------------------------------*/ #define NewCANSendVersion 0 typedef struct { uint32_t m_temp_size; FDCAN_HandleTypeDef *m_can; FDCAN_TxHeaderTypeDef *m_cantx; FDCAN_RxHeaderTypeDef *m_canrx; uint8_t *m_temp; }TCANUserData; /*==============================================* * project-wide global variables * *----------------------------------------------*/ /*==============================================* * routines' or functions' implementations * *----------------------------------------------*/ extern void CAN_IT_init(TComCtrl *_ptComCtrl); extern TCANUserData *CAN_userdata_init(FDCAN_HandleTypeDef *_fdCAN, uint32_t _Size, int _iIsLoop); extern void CAN_RX_IRQHandler(TComCtrl *_ptComCtrl); extern int CAN_TX_FIFOQ(TComCtrl *_ptComCtrl, uint32_t _iFrameID, char *_pBuffer, uint32_t _iSize); #endif #ifdef __cplusplus #if __cplusplus } #endif #endif /* __cplusplus */ #endif /* __BSP_CAN_H__ */