Author: evb
Date: Thu Feb 4 09:02:30 2010
New Revision: 45416
URL:
http://svn.reactos.org/svn/reactos?rev=45416&view=rev
Log:
- Refactor keyboard support to match serial. Now reading a key and waiting for a key are
two things.
- Implement KbHit Firmware routine.
- It is now possible to interact with FreeLDR using the keyboard.
Modified:
trunk/reactos/boot/armllb/fw.c
trunk/reactos/boot/armllb/hw/versatile/hwkmi.c
trunk/reactos/boot/armllb/inc/hw.h
Modified: trunk/reactos/boot/armllb/fw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/fw.c?rev=45416…
==============================================================================
--- trunk/reactos/boot/armllb/fw.c [iso-8859-1] (original)
+++ trunk/reactos/boot/armllb/fw.c [iso-8859-1] Thu Feb 4 09:02:30 2010
@@ -21,8 +21,8 @@
BOOLEAN
LlbFwKbHit(VOID)
{
- /* Not yet implemented */
- return FALSE;
+ /* Check RX buffer */
+ return LlbHwKbdReady();
}
INT
Modified: trunk/reactos/boot/armllb/hw/versatile/hwkmi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/versatile/h…
==============================================================================
--- trunk/reactos/boot/armllb/hw/versatile/hwkmi.c [iso-8859-1] (original)
+++ trunk/reactos/boot/armllb/hw/versatile/hwkmi.c [iso-8859-1] Thu Feb 4 09:02:30 2010
@@ -115,19 +115,17 @@
WRITE_REGISTER_UCHAR(PL050_KMIDATA, Value);
}
+BOOLEAN
+NTAPI
+LlbHwKbdReady(VOID)
+{
+ return READ_REGISTER_UCHAR(PL050_KMISTAT) & KMISTAT_RXFULL;
+}
+
INT
NTAPI
LlbHwKbdRead(VOID)
{
- ULONG Status;
-
- /* Wait for ready signal */
- do
- {
- /* Read TX buffer state */
- Status = READ_REGISTER_UCHAR(PL050_KMISTAT);
- } while (!(Status & KMISTAT_RXFULL));
-
/* Read current data on keyboard */
return READ_REGISTER_UCHAR(PL050_KMIDATA);
}
Modified: trunk/reactos/boot/armllb/inc/hw.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/hw.h?rev=4…
==============================================================================
--- trunk/reactos/boot/armllb/inc/hw.h [iso-8859-1] (original)
+++ trunk/reactos/boot/armllb/inc/hw.h [iso-8859-1] Thu Feb 4 09:02:30 2010
@@ -92,6 +92,12 @@
IN ULONG Value
);
+BOOLEAN
+NTAPI
+LlbHwKbdReady(
+ VOID
+);
+
INT
NTAPI
LlbHwKbdRead(