Author: quozl Date: Wed Sep 5 01:46:39 2012 New Revision: 3283 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3283
Log: OLPC XO-4 - Neonode, complete IR PCB ASSY test
Modified: cpu/arm/olpc/1.75/fw.bth cpu/arm/olpc/nn-touchscreen.fth
Modified: cpu/arm/olpc/1.75/fw.bth ============================================================================== --- cpu/arm/olpc/1.75/fw.bth Tue Sep 4 20:07:11 2012 (r3282) +++ cpu/arm/olpc/1.75/fw.bth Wed Sep 5 01:46:39 2012 (r3283) @@ -26,7 +26,6 @@ fload ${BP}/cpu/arm/olpc/1.75/lcdcfg.fth fload ${BP}/cpu/arm/olpc/1.75/usb.fth fload ${BP}/cpu/arm/olpc/nn-touchscreen.fth -fload ${BP}/cpu/arm/olpc/rm3150-touchscreen.fth fload ${BP}/cpu/arm/olpc/1.75/compass.fth fload ${BP}/cpu/arm/olpc/1.75/switches.fth fload ${BP}/cpu/arm/olpc/1.75/leds.fth
Modified: cpu/arm/olpc/nn-touchscreen.fth ============================================================================== --- cpu/arm/olpc/nn-touchscreen.fth Tue Sep 4 20:07:11 2012 (r3282) +++ cpu/arm/olpc/nn-touchscreen.fth Wed Sep 5 01:46:39 2012 (r3283) @@ -186,7 +186,7 @@ (.version) 2+ [char] . emit loop ( addr ) - (.version) ( ) + (.version) drop ( ) ;
: test-version ( -- ) @@ -544,6 +544,7 @@
: ev ( handler -- ) to (ev) + get-msecs d# 30000 + ( to ) begin in? if pbuf 2+ c@ h# 04 = if \ touch notification event @@ -555,11 +556,12 @@ (ev) ( ) loop then - then - key? dup if key drop then ( key? ) - remaining 0= or ( exit? ) - \ FIXME: add 30-second timeout - until + then ( to ) + dup get-msecs - 0< ( to timeout? ) + dup if fault then ( to timeout? ) + key? dup if key drop then ( to timeout? key? ) + or remaining 0= or ( to exit? ) + until drop ( ) ;
: ev( @@ -755,6 +757,27 @@ finish-device device-end
+: test-touchscreen ( -- error? ) + " /touchscreen" " selftest" execute-device-method if + throw + then +; + +: test-pass-or-fail ( function -- error? ) + catch if + show-fail + else + show-pass + then +; + +: test-ir-pcb-assy ( -- error? ) + test-station h# 12 to test-station ( test-station ) + ['] test-touchscreen test-pass-or-fail ( test-station error? ) + swap to test-station ( error? ) +; + + \ LICENSE_BEGIN \ Copyright (c) 2012 FirmWorks \
openfirmware@openfirmware.info