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>
18 extern uint32_t __arm_periiobase
;
19 #define ARM_PERIIOBASE (__arm_periiobase)
21 /* See rom/kernel/maygetchar.c for documentation */
23 AROS_LH0(int, KrnMayGetChar
,
24 struct KernelBase
*, KernelBase
, 26, Kernel
)
28 if ((*(volatile uint32_t *)(PL011_0_BASE
+ PL011_FR
) & PL011_FR_RXFE
) == 0)
29 return (int)*(volatile uint32_t *)(PL011_0_BASE
+ PL011_DR
);