fearly_uart.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright : (C) 2022 Phytium Information Technology, Inc.
  3. * All Rights Reserved.
  4. *
  5. * This program is OPEN SOURCE software: you can redistribute it and/or modify it
  6. * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd,
  7. * either version 1.0 of the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY;
  10. * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. * See the Phytium Public License for more details.
  12. *
  13. *
  14. * FilePath: fearly_uart.h
  15. * Date: 2022-02-11 13:33:28
  16. * LastEditTime: 2022-02-17 18:00:16
  17. * Description:  This file is for
  18. *
  19. * Modify History:
  20. * Ver   Who        Date         Changes
  21. * ----- ------     --------    --------------------------------------
  22. * 1.0 rtos 2022/6/25 init commit
  23. * 1.1 zhangyan 2023/7/11 reconstruct
  24. */
  25. #ifndef COMMON_FEARLY_UART_H
  26. #define COMMON_FEARLY_UART_H
  27. #ifdef __cplusplus
  28. extern "C"
  29. {
  30. #endif
  31. /***************************** Include Files *********************************/
  32. #include "rtconfig.h"
  33. #include "ftypes.h"
  34. #include "fio.h"
  35. #include "fparameters.h"
  36. /**************************** Type Definitions *******************************/
  37. /************************** Constant Definitions *****************************/
  38. #if defined(DEFAULT_DEBUG_PRINT_UART2)
  39. #define EARLY_UART_CTRL_ID FUART2_ID
  40. #elif defined(DEFAULT_DEBUG_PRINT_UART0)
  41. #define EARLY_UART_CTRL_ID FUART0_ID
  42. #else
  43. #define EARLY_UART_CTRL_ID FUART1_ID
  44. #endif
  45. #define STDOUT_BASEADDRESS
  46. /************************** Variable Definitions *****************************/
  47. /***************** Macros (Inline Functions) Definitions *********************/
  48. /*****************************************************************************/
  49. void FEarlyUartProbe(void);
  50. void OutByte(s8 byte);
  51. char GetByte(void);
  52. #ifdef __cplusplus
  53. }
  54. #endif
  55. #endif