2 Copyright © 2013-2015, The AROS Development Team. All rights reserved.
6 #include <aros/kernel.h>
8 #include <hardware/bcm283x.h>
9 #include <hardware/pl011uart.h>
11 #include <kernel_base.h>
12 #include <kernel_debug.h>
14 #include <proto/kernel.h>
16 /* See rom/kernel/maygetchar.c for documentation */
18 AROS_LH0(int, KrnMayGetChar
,
19 struct KernelBase
*, KernelBase
, 26, Kernel
)
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
);