drv_can.h 650 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. #ifndef __DRV_CAN_H__
  11. #define __DRV_CAN_H__
  12. #ifdef __cplusplus
  13. extern "C"
  14. {
  15. #endif
  16. #include <board.h>
  17. #include <rtdevice.h>
  18. #include <rtthread.h>
  19. #include "ft_can.h"
  20. struct ft2004_can
  21. {
  22. const char *name;
  23. FCan_t can_handle;
  24. struct rt_semaphore recv_semaphore;
  25. struct rt_can_device device; /* inherit from can device */
  26. };
  27. int rt_hw_can_init(void);
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif // !