Author: wmb Date: 2007-06-05 21:18:50 +0200 (Tue, 05 Jun 2007) New Revision: 438
Modified: dev/pckbd.fth Log: OLPC - use an abbreviated init sequence for the OLPC keyboard, to avoid startup failures with the EC wants to send us events from non-keyboard sources.
Modified: dev/pckbd.fth =================================================================== --- dev/pckbd.fth 2007-06-05 19:15:23 UTC (rev 437) +++ dev/pckbd.fth 2007-06-05 19:18:50 UTC (rev 438) @@ -335,9 +335,24 @@ false ;
+: ?olpc-keyboard ( -- ) + " enable-intf" $call-parent + begin get-data? while + drop + true to keyboard-present? + 5 ms + repeat + keyboard-present? if exit then + kbd-reset 0= to keyboard-present? +; + : reset ( -- ) init-data - clear-state get-initial-state + clear-state +[ifdef] olpc + ?olpc-keyboard +[else] + get-initial-state
\ Test the keyboard interface clock and data lines " test-lines" $call-parent if false to keyboard-present? exit then @@ -354,6 +369,7 @@
\ 7 set-leds d# 100 ms 0 set-leds then +[then]
\ Leave the keyboard in scan set 2 (its default state), but also leave \ the 8042 in the mode where it translates to scan set 1.