xref: /rk3399_ARM-atf/lib/libc/putchar.c (revision 8bb6de151892f20afcffe7cfa114710e0a47d6c6)
1 /*
2  * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #include <stdio.h>
8 #include <console.h>
9 
10 int putchar(int c)
11 {
12 	int res;
13 	if (console_putc((unsigned char)c) >= 0)
14 		res = c;
15 	else
16 		res = EOF;
17 
18 	return res;
19 }
20