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 28 #ifdef __cplusplus 29 extern "C" 30 { 31 #endif 32 33 /***************************** Include Files *********************************/ 34 #include "rtconfig.h" 35 #include "ftypes.h" 36 #include "fio.h" 37 #include "fparameters.h" 38 39 /**************************** Type Definitions *******************************/ 40 41 /************************** Constant Definitions *****************************/ 42 #if defined(DEFAULT_DEBUG_PRINT_UART2) 43 #define EARLY_UART_CTRL_ID FUART2_ID 44 #elif defined(DEFAULT_DEBUG_PRINT_UART0) 45 #define EARLY_UART_CTRL_ID FUART0_ID 46 #else 47 #define EARLY_UART_CTRL_ID FUART1_ID 48 #endif 49 50 #define STDOUT_BASEADDRESS 51 /************************** Variable Definitions *****************************/ 52 53 /***************** Macros (Inline Functions) Definitions *********************/ 54 55 /*****************************************************************************/ 56 void FEarlyUartProbe(void); 57 void OutByte(s8 byte); 58 char GetByte(void); 59 60 #ifdef __cplusplus 61 } 62 #endif 63 64 #endif