e2db80c4f7cd4e4eb6dc35dedab04d58b031300f
2 Copyright © 2013, The AROS Development Team. All rights reserved.
6 #include <aros/kernel.h>
8 #include <asm/bcm2835.h>
9 #include <hardware/pl011uart.h>
11 #include <kernel_base.h>
12 #include <kernel_debug.h>
14 /*****************************************************************************
17 #include <proto/kernel.h>
19 AROS_LH0(int, KrnMayGetChar
,
24 struct KernelBase
*, KernelBase
, 26, Kernel
)
27 Read a single character from low-level debug input stream
33 An ASCII code of the character or -1 if there's no character
37 This function never waits. If there is no character available on
38 the stream it just returns with -1
48 ******************************************************************************/
52 if ((*(volatile uint32_t *)(PL011_0_BASE
+ PL011_FR
) & PL011_FR_RXFE
) == 0)
53 return (int)*(volatile uint32_t *)(PL011_0_BASE
+ PL011_DR
);