can_config.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (c) 2006-2025, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-10-29 mazhiyuan first version
  9. */
  10. #ifndef __CAN_CONFIG_H__
  11. #define __CAN_CONFIG_H__
  12. #include <rtthread.h>
  13. #include "hal_data.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #if defined(BSP_USING_CAN0)
  18. #ifndef CAN0_CONFIG
  19. #define CAN0_CONFIG \
  20. { \
  21. .name = "can0", \
  22. .num_of_mailboxs = CAN_NO_OF_MAILBOXES_g_can0, \
  23. .p_api_ctrl = &g_can0_ctrl, \
  24. .p_cfg = &g_can0_cfg, \
  25. }
  26. #endif /* CAN0_CONFIG */
  27. #endif /* BSP_USING_CAN0 */
  28. #if defined(BSP_USING_CAN1)
  29. #ifndef CAN1_CONFIG
  30. #define CAN1_CONFIG \
  31. { \
  32. .name = "can1", \
  33. .num_of_mailboxs = CAN_NO_OF_MAILBOXES_g_can1, \
  34. .p_api_ctrl = &g_can1_ctrl, \
  35. .p_cfg = &g_can1_cfg, \
  36. }
  37. #endif /* CAN1_CONFIG */
  38. #endif /* BSP_USING_CAN1 */
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif