Harry Liebel | 1bc9e1f | 2013-12-12 16:46:30 +0000 | [diff] [blame] | 1 | /* |
Antonio Nino Diaz | 9eddb1e | 2018-08-16 14:53:05 +0100 | [diff] [blame] | 2 | * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. |
Harry Liebel | 1bc9e1f | 2013-12-12 16:46:30 +0000 | [diff] [blame] | 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Harry Liebel | 1bc9e1f | 2013-12-12 16:46:30 +0000 | [diff] [blame] | 5 | */ |
6 | |||||
7 | #include <stdio.h> | ||||
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 8 | |
9 | #include <drivers/console.h> | ||||
Harry Liebel | 1bc9e1f | 2013-12-12 16:46:30 +0000 | [diff] [blame] | 10 | |
Harry Liebel | 1bc9e1f | 2013-12-12 16:46:30 +0000 | [diff] [blame] | 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 | } |