drv_usart_v2.h 725 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2006-2021, 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. */
  10. #ifndef __DRV_USART_V2_H__
  11. #define __DRV_USART_V2_H__
  12. #include <rtthread.h>
  13. #include <rtdevice.h>
  14. #include <rthw.h>
  15. #include <drv_common.h>
  16. #include <drv_config.h>
  17. #include <hal_data.h>
  18. /* renesas config class */
  19. struct ra_uart_config
  20. {
  21. const char *name;
  22. uart_ctrl_t *const p_api_ctrl;
  23. uart_cfg_t const *const p_cfg;
  24. };
  25. struct ra_uart
  26. {
  27. struct rt_serial_device serial;
  28. rt_uint16_t uart_dma_flag;
  29. struct ra_uart_config *config;
  30. };
  31. int rt_hw_usart_init(void);
  32. #endif /* __DRV_USART_H__ */