board_config.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. *
  3. * SPDX-License-Identifier: Apache-2.0
  4. *
  5. * Change Logs:
  6. * Date Author Notes
  7. * 2020-09-05 DongBowen first version
  8. */
  9. #ifndef __BOARD_CONFIG_H__
  10. #define __BOARD_CONFIG_H__
  11. #include <rtconfig.h>
  12. #include "hc32l196_ddl.h"
  13. #include "hc32l196_gpio.h"
  14. #include "hc32l196_uart.h"
  15. #include "hc32l196_sysctrl.h"
  16. /*********** Port configure *********/
  17. #if defined(BSP_USING_UART0)
  18. #define UART0_RX_PORT GpioPortA
  19. #define UART0_RX_PIN GpioPin10
  20. #define UART0_RX_AF GpioAf1
  21. #define UART0_TX_PORT GpioPortA
  22. #define UART0_TX_PIN GpioPin9
  23. #define UART0_TX_AF GpioAf1
  24. #endif
  25. #if defined(BSP_USING_UART1)
  26. #define UART1_RX_PORT GpioPortA
  27. #define UART1_RX_PIN GpioPin3
  28. #define UART1_RX_AF GpioAf1
  29. #define UART1_TX_PORT GpioPortA
  30. #define UART1_TX_PIN GpioPin2
  31. #define UART1_TX_AF GpioAf1
  32. #endif
  33. #endif