uart_config.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. * 2025-08-17 CYFS first version
  9. */
  10. #ifndef __UART_CONFIG_H__
  11. #define __UART_CONFIG_H__
  12. #include <rtthread.h>
  13. #include "hal_data.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #if defined(BSP_USING_UART0)
  18. #ifndef UART0_CONFIG
  19. #define UART0_CONFIG \
  20. { \
  21. .name = "uart0", \
  22. .p_api_ctrl = &g_uart0_ctrl, \
  23. .p_cfg = &g_uart0_cfg, \
  24. }
  25. #endif /* UART0_CONFIG */
  26. #endif /* BSP_USING_UART0 */
  27. #if defined(BSP_USING_UART1)
  28. #ifndef UART1_CONFIG
  29. #define UART1_CONFIG \
  30. { \
  31. .name = "uart1", \
  32. .p_api_ctrl = &g_uart1_ctrl, \
  33. .p_cfg = &g_uart1_cfg, \
  34. }
  35. #endif /* UART1_CONFIG */
  36. #endif /* BSP_USING_UART1 */
  37. #if defined(BSP_USING_UART9)
  38. #ifndef UART9_CONFIG
  39. #define UART9_CONFIG \
  40. { \
  41. .name = "uart9", \
  42. .p_api_ctrl = &g_uart9_ctrl, \
  43. .p_cfg = &g_uart9_cfg, \
  44. }
  45. #endif /* UART9_CONFIG */
  46. #endif /* BSP_USING_UART9 */
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif