make sure we pull in the correct headers
[AROS.git] / arch / arm-native / kernel / maygetchar.c
blob011b7596eaa5cf52328ff8095b1aceb0d7fd7460
1 /*
2 Copyright © 2013-2015, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/kernel.h>
8 #include <kernel_base.h>
9 #include <kernel_debug.h>
10 #include "kernel_intern.h"
11 #include <hardware/pl011uart.h>
13 #include <proto/kernel.h>
14 #include <stdint.h>
16 /* See rom/kernel/maygetchar.c for documentation */
18 AROS_LH0(int, KrnMayGetChar,
19 struct KernelBase *, KernelBase, 26, Kernel)
21 AROS_LIBFUNC_INIT
23 if ((*(volatile uint32_t *)(PL011_0_BASE + PL011_FR) & PL011_FR_RXFE) == 0)
24 return (int)*(volatile uint32_t *)(PL011_0_BASE + PL011_DR);
26 return -1;
28 AROS_LIBFUNC_EXIT