xiaohu.huang | a341cbe | 2022-10-17 15:51:22 +0800 | [diff] [blame] | 1 | /* |
2 | * Copyright (c) 2021-2022 Amlogic, Inc. All rights reserved. | ||||
3 | * | ||||
4 | * SPDX-License-Identifier: MIT | ||||
5 | */ | ||||
6 | |||||
7 | #include "aml_putchar.h" | ||||
xiaohu.huang | f73fc29 | 2022-11-03 15:50:25 +0800 | [diff] [blame^] | 8 | #if (1 == CONFIG_ARM64) |
9 | #include "serial.h" | ||||
10 | #else | ||||
xiaohu.huang | a341cbe | 2022-10-17 15:51:22 +0800 | [diff] [blame] | 11 | #include "uart.h" |
xiaohu.huang | f73fc29 | 2022-11-03 15:50:25 +0800 | [diff] [blame^] | 12 | #endif |
xiaohu.huang | a341cbe | 2022-10-17 15:51:22 +0800 | [diff] [blame] | 13 | |
14 | int putchar(int c) | ||||
15 | { | ||||
xiaohu.huang | f73fc29 | 2022-11-03 15:50:25 +0800 | [diff] [blame^] | 16 | #if (1 == CONFIG_ARM64) |
17 | vSerialPutChar(ConsoleSerial, c); | ||||
18 | #else | ||||
xiaohu.huang | a341cbe | 2022-10-17 15:51:22 +0800 | [diff] [blame] | 19 | vUartPutc(c); |
xiaohu.huang | f73fc29 | 2022-11-03 15:50:25 +0800 | [diff] [blame^] | 20 | #endif |
xiaohu.huang | a341cbe | 2022-10-17 15:51:22 +0800 | [diff] [blame] | 21 | |
22 | return 0; | ||||
23 | } |