drv_uart.h 684 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. /* config class */
  16. struct hbird_uart_config
  17. {
  18. const char *name;
  19. UART_TypeDef *uart;
  20. IRQn_Type irqn;
  21. };
  22. /* hbird uart dirver class */
  23. struct hbird_uart
  24. {
  25. struct hbird_uart_config *config;
  26. struct rt_serial_device serial;
  27. };
  28. extern int rt_hw_uart_init(void);
  29. #endif /* __DRV_USART_H__ */
  30. /******************* end of file *******************/