[openfirmware] [commit] r1914 - dev/olpc/keyboard

repository service svn at openfirmware.info
Thu Aug 5 02:37:12 CEST 2010


Author: wmb
Date: Thu Aug  5 02:37:12 2010
New Revision: 1914
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1914

Log:
OLPC keyboard selftest - faster/simpler version of stuck key sensing code.

Modified:
   dev/olpc/keyboard/selftest.fth

Modified: dev/olpc/keyboard/selftest.fth
==============================================================================
--- dev/olpc/keyboard/selftest.fth	Wed Aug  4 19:08:23 2010	(r1913)
+++ dev/olpc/keyboard/selftest.fth	Thu Aug  5 02:37:12 2010	(r1914)
@@ -196,17 +196,7 @@
 ;
 [then]
 
-: key-stuck?  ( -- flag )
-   ukey?  if  debug-me  then
-   #keys  0  do
-      i key-adr >key-time @  ?dup  if      ( msecs )
-         d# 3,000 +  get-msecs -  0<  if   ( )
-            true unloop exit
-         then
-      then
-   loop
-   false
-;
+0 value key-stuck?
 
 d# 128 8 / constant #key-bytes
 #key-bytes buffer: key-bitmap
@@ -519,7 +509,7 @@
 : set-key-time  ( timestamp key-adr -- )
    over 0<>  over >key-time @  0<>  and   if  ( timestamp key-adr )
       \ If both timestamp and old key time are nonzero, then we preserve the old key time
-      2drop
+      >key-time @  d# 3,000 +  -  0>  to key-stuck?
    else
       \ If either timestamp or old key time is 0, we set the key time
       >key-time !
@@ -640,6 +630,7 @@
 
    make-keys
 
+   0 to key-stuck?
    cursor-off draw-keyboard
    true to locked?   \ Disable the keyboard alarm handler; it steals our scancodes
    selftest-keys



More information about the openfirmware mailing list