drv_usartX.h 779 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. * 2021-07-29 KyleChan first version
  9. * 2022-06-08 THEWON first version for serialX
  10. */
  11. #ifndef __DRV_USART_V2_H__
  12. #define __DRV_USART_V2_H__
  13. #include <rtthread.h>
  14. #include <rtdevice.h>
  15. #include <rthw.h>
  16. #include <drv_common.h>
  17. #include <drv_config.h>
  18. #include <hal_data.h>
  19. /* renesas config class */
  20. struct ra_uart_config
  21. {
  22. const char *name;
  23. uart_ctrl_t * p_api_ctrl;
  24. uart_cfg_t uart_cfg;
  25. };
  26. struct ra_uart
  27. {
  28. struct rt_serial_device serial;
  29. struct ra_uart_config *uart_config;
  30. rt_bool_t intTxing;
  31. };
  32. int rt_hw_usart_init(void);
  33. #endif /* __DRV_USART_H__ */