drv_can.h 688 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2019-11-09 wangyq the first version
  9. */
  10. #ifndef DRV_CAN_H__
  11. #define DRV_CAN_H__
  12. #include <board.h>
  13. #include <rtdevice.h>
  14. #include <rtthread.h>
  15. #include <ald_can.h>
  16. #include <ald_gpio.h>
  17. struct es32f0_baud_rate_tab
  18. {
  19. rt_uint32_t baud_rate;
  20. rt_uint32_t config_data;
  21. };
  22. /* es32f0 can device */
  23. struct es32f0_can
  24. {
  25. can_handle_t CanHandle;
  26. can_filter_t FilterConfig;
  27. struct rt_can_device device; /* inherit from can device */
  28. };
  29. int rt_hw_can_init(void);
  30. #endif /*DRV_CAN_H__ */