serial.h 912 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2006-2025, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2025-08-10 Siwei Xu Add i.MX91 SDK
  9. * 2025-09-15 Siwei Xu Fix LPUART driver
  10. */
  11. #ifndef __UART_H__
  12. #define __UART_H__
  13. #include "board.h"
  14. #include <rtthread.h>
  15. int rt_hw_uart_init(void);
  16. #ifdef BSP_USING_EARLY_CONSOLE
  17. void rt_hw_earlycon_ioremap(void);
  18. void rt_hw_earlycon_putc(char c);
  19. void rt_hw_earlycon_puts(const char *str);
  20. void rt_hw_earlycon_print_hex(const char *str, rt_base_t hex);
  21. #else
  22. static inline void rt_hw_earlycon_ioremap(void) {}
  23. static inline void rt_hw_earlycon_putc(char c) {}
  24. static inline void rt_hw_earlycon_puts(const char *str) {}
  25. static inline void rt_hw_earlycon_print_hex(const char *str, rt_base_t hex) {}
  26. #endif
  27. void rt_hw_console_putc(char c);
  28. void rt_hw_console_output(const char *str);
  29. #endif