blob: 037e28ac4237bb46caa2c1a7e078932e9b05bad1 [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>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00008
9#include <drivers/console.h>
Harry Liebel1bc9e1f2013-12-12 16:46:30 +000010
Harry Liebel1bc9e1f2013-12-12 16:46:30 +000011int 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}