drv_usart.h 679 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2006-2020, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2020-04-15 hqfang first version
  9. */
  10. #ifndef __DRV_UART_H__
  11. #define __DRV_UART_H__
  12. #include <rtthread.h>
  13. #include <rtdevice.h>
  14. #include <drv_config.h>
  15. /* gd32 config class */
  16. struct gd32_uart_config
  17. {
  18. const char *name;
  19. uint32_t uart_base;
  20. IRQn_Type irqn;
  21. };
  22. /* gd32 uart dirver class */
  23. struct gd32_uart
  24. {
  25. struct rt_serial_device serial;
  26. struct gd32_uart_config *config;
  27. };
  28. int rt_hw_usart_init(void);
  29. #endif /* __DRV_USART_H__ */
  30. /******************* end of file *******************/