Ambroise Vincent | 4128f9f | 2019-02-11 13:34:41 +0000 | [diff] [blame] | 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 | |||||
9 | #include <drivers/console.h> | ||||
10 | |||||
11 | int putchar(int c) | ||||
12 | { | ||||
13 | int res; | ||||
14 | if (console_putc((unsigned char)c) >= 0) | ||||
15 | res = c; | ||||
16 | else | ||||
17 | res = EOF; | ||||
18 | |||||
19 | return res; | ||||
20 | } |