j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: wmb Date: 2007-08-01 05:13:15 +0200 (Wed, 01 Aug 2007) New Revision: 508
Modified: dev/i8042.fth dev/olpc/touchpad/touchpad.fth Log: PS2 drivers - Added debugging features to help in debugging ESD-induced resets of the OLPC touchpad.
Modified: dev/i8042.fth =================================================================== --- dev/i8042.fth 2007-08-01 03:11:46 UTC (rev 507) +++ dev/i8042.fth 2007-08-01 03:13:15 UTC (rev 508) @@ -19,6 +19,12 @@ 1 " #address-cells" integer-property 0 " #size-cells" integer-property
+0 value debug? +also forth definitions +: debug-ps2 ( -- ) true to debug? ; +: undebug-ps2 ( -- ) false to debug? ; +previous definitions + hex
[ifndef] $= @@ -97,7 +103,8 @@ headerless
: stat@ ( -- byte ) cmd-status-reg rb@ ; -: data@ ( -- byte ) data-port rb@ ; +: data@ ( -- byte ) data-port rb@ debug? if ." <" dup . then ; +: data! ( byte -- ) debug? if ." >" dup . then data-port rb! ;
\ *** Following delay can be reduced after testing ***
@@ -144,14 +151,16 @@ ; headerless
-: put-ctlr-cmd ( cmd -- ) in-wait cmd-status-reg rb! ; +: put-ctlr-cmd ( cmd -- ) + in-wait debug? if ." ^" dup . then cmd-status-reg rb! +;
headers : put-data ( data -- ) port if - lock[ h# d4 put-ctlr-cmd in-wait data-port rb! ]unlock + lock[ h# d4 put-ctlr-cmd in-wait data! ]unlock else - in-wait data-port rb! + in-wait data! then ;
Modified: dev/olpc/touchpad/touchpad.fth =================================================================== --- dev/olpc/touchpad/touchpad.fth 2007-08-01 03:11:46 UTC (rev 507) +++ dev/olpc/touchpad/touchpad.fth 2007-08-01 03:13:15 UTC (rev 508) @@ -236,6 +236,13 @@ h# cf of decode-pt true exit endof h# ff of decode-gs true exit endof \ h# eb of decode-simultaneous exit endof + h# aa of + 0 d# 28 at-xy red-screen white-letters + ." Unexpected touchpad reset" + white-screen black-letters + cr + start gs-only false exit + endof ( default ) \ If the high bit is set it means it's the first byte \ of a packet. Abort if we don't recognize the type. @@ -379,7 +386,11 @@ background gs-only begin - begin pad? if track then key? until + begin + ['] pad? catch ?dup if .error close true exit then + if track then + key? until + key upc case [char] P of cursor-on