blob: 1595bdc1b4282b93649ceafb554d8a5fe10e2eda [file] [log] [blame]
xiaohu.huanga341cbe2022-10-17 15:51:22 +08001/*
2 * Copyright (c) 2021-2022 Amlogic, Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#include "aml_putchar.h"
xiaohu.huangf73fc292022-11-03 15:50:25 +08008#if (1 == CONFIG_ARM64)
9#include "serial.h"
10#else
xiaohu.huanga341cbe2022-10-17 15:51:22 +080011#include "uart.h"
xiaohu.huangf73fc292022-11-03 15:50:25 +080012#endif
xiaohu.huanga341cbe2022-10-17 15:51:22 +080013
14int putchar(int c)
15{
xiaohu.huangf73fc292022-11-03 15:50:25 +080016#if (1 == CONFIG_ARM64)
17 vSerialPutChar(ConsoleSerial, c);
18#else
xiaohu.huanga341cbe2022-10-17 15:51:22 +080019 vUartPutc(c);
xiaohu.huangf73fc292022-11-03 15:50:25 +080020#endif
xiaohu.huanga341cbe2022-10-17 15:51:22 +080021
22 return 0;
23}