Indentation fix, cleanup.
[AROS.git] / arch / arm-efika / kernel / maygetchar.c
blob3b701bb4b075f06b2b8f4d932542a2bffc028814
1 /*
2 Copyright © 2013, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/kernel.h>
8 #include <hardware/mx51_uart.h>
10 #include <kernel_base.h>
11 #include <kernel_debug.h>
13 #include <proto/kernel.h>
15 /* See rom/kernel/maygetchar.c for documentation */
17 AROS_LH0(int, KrnMayGetChar,
18 struct KernelBase *, KernelBase, 26, Kernel)
20 AROS_LIBFUNC_INIT
22 volatile MX51_UART * const uart = (MX51_UART *)UART1_BASE_ADDR;
24 if (uart->USR2 & UART_USR2_RDR)
25 return uart->URXD;
26 else
27 return -1;
29 AROS_LIBFUNC_EXIT