uart_config.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-03-02 FMD-AE first version
  9. */
  10. #ifndef __UART_CONFIG_H__
  11. #define __UART_CONFIG_H__
  12. #include <rtthread.h>
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #if defined(BSP_USING_UART1)
  17. #ifndef UART1_CONFIG
  18. #define UART1_CONFIG \
  19. { \
  20. .name = "uart1", \
  21. .Instance = USART1, \
  22. .irq_type = USART1_IRQn, \
  23. }
  24. #endif /* UART1_CONFIG */
  25. #endif /* BSP_USING_UART1 */
  26. #if defined(BSP_USING_UART2)
  27. #ifndef UART2_CONFIG
  28. #define UART2_CONFIG \
  29. { \
  30. .name = "uart2", \
  31. .Instance = USART2, \
  32. .irq_type = USART2_IRQn, \
  33. }
  34. #endif /* UART2_CONFIG */
  35. #endif /* BSP_USING_UART2 */
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #endif /* __UART_CONFIG_H__ */