blob: 0beb625b2d0beff3218431304e5d3ac42cff869d [file] [log] [blame]
Harry Liebel1bc9e1f2013-12-12 16:46:30 +00001/*
Antonio Nino Diaz9eddb1e2018-08-16 14:53:05 +01002 * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
Harry Liebel1bc9e1f2013-12-12 16:46:30 +00003 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Harry Liebel1bc9e1f2013-12-12 16:46:30 +00005 */
6
7#include <stdio.h>
8#include <console.h>
9
Harry Liebel1bc9e1f2013-12-12 16:46:30 +000010int 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}