1 /* 2 * Copyright (c) 2006-2021, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2021-05-11 Carl the first version 9 */ 10 11 #ifndef __DRV_CAN_H__ 12 #define __DRV_CAN_H__ 13 14 #ifdef __cplusplus 15 extern "C" 16 { 17 #endif 18 19 #include <board.h> 20 #include <rtdevice.h> 21 #include <rtthread.h> 22 #include "ft_can.h" 23 24 struct ft2004_can 25 { 26 const char *name; 27 FCan_t can_handle; 28 struct rt_semaphore recv_semaphore; 29 struct rt_can_device device; /* inherit from can device */ 30 }; 31 32 int rt_hw_can_init(void); 33 34 #ifdef __cplusplus 35 } 36 #endif 37 38 #endif // ! 39