Author: quozl Date: Fri Aug 31 08:19:41 2012 New Revision: 3265 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3265
Log: OLPC XO-4 - Neonode, multitouch graphical test
Modified: cpu/arm/mmp2/twsi-node.fth cpu/arm/olpc/nn-touchscreen.fth cpu/arm/olpc/rm3150-touchscreen.fth cpu/arm/olpc/touchscreen-common.fth
Modified: cpu/arm/mmp2/twsi-node.fth ============================================================================== --- cpu/arm/mmp2/twsi-node.fth Fri Aug 31 02:44:16 2012 (r3264) +++ cpu/arm/mmp2/twsi-node.fth Fri Aug 31 08:19:41 2012 (r3265) @@ -56,6 +56,7 @@ : bytes-out-in ( out ... #outs #ins -- in ... ) " bytes-out-in" $call-twsi ;
: get ( #bytes -- bytes ... ) 0 swap bytes-out-in ; +: read-bytes ( adr len -- ) " read-bytes" $call-twsi ;
: reg-b@ ( reg# -- b ) " reg-b@" $call-twsi ; : reg-b! ( b reg# -- ) " reg-b!" $call-twsi ;
Modified: cpu/arm/olpc/nn-touchscreen.fth ============================================================================== --- cpu/arm/olpc/nn-touchscreen.fth Fri Aug 31 02:44:16 2012 (r3264) +++ cpu/arm/olpc/nn-touchscreen.fth Fri Aug 31 08:19:41 2012 (r3265) @@ -534,47 +534,73 @@ key drop ;
+: (scribble) + begin + in? if + pbuf 2+ c@ h# 04 = if \ touch notification event + pbuf 3 + c@ 0 do \ per subpacket loop + pbuf 4 + i 9 * + >r ( r:addr ) + screen-w r@ w@ - ( x r:addr ) + r@ wa1+ w@ ( x y r:addr ) + r> 4 + c@ 2 rshift setcolor ( x y ) + dot + loop + then + then + exit-test? until +; + : scribble + configure + \ FIXME: tune with set scanning frequency request cursor-off + consume + begin in? 0= until background - begin - stream-poll? if drop dot then - key? until + (scribble) cursor-on - \ FIXME: tune the event frequency with set scanning frequency request + page ;
-: selftest ( -- error? ) +: ir-pcb-smt ( -- error? ) + hold-reset connect + open if test-os else fault then + hold-reset disconnect + faults +;
- 0 to faults +: ir-pcb-assy ( -- error? ) + hold-reset connect + open if test-fll else fault then + hold-reset disconnect + faults +;
- test-station h# 11 = if \ IR PCB SMT - hold-reset connect - open if test-os else fault then - hold-reset disconnect - faults exit - then - - test-station h# 12 = if \ IR PCB ASSY - hold-reset connect - open if test-fll else fault then - hold-reset disconnect - faults exit - then - - test-station h# 1 = if \ MB SMT - open 0= if true exit then - test-version - close - false exit - then +: mb-smt ( -- error? ) + open 0= if true exit then + test-version + close + false +;
+: mb-assy ( -- error? ) [ifdef] nn-ir-pcb-rev-b - test-station h# 2 = if \ MB ASSY - open if test-finger-down-each-edge else fault then - faults exit - then + open 0= if true exit then + test-finger-down-each-edge + faults [then] +; + +: selftest ( -- error? ) + + 0 to faults + + test-station case + h# 1 = of mb-smt exit endof + h# 2 = of mb-assy exit endof + h# 11 = of ir-pcb-smt exit endof + h# 12 = of ir-pcb-assy exit endof + endcase
\ MB FINAL \ MB SHIP
Modified: cpu/arm/olpc/rm3150-touchscreen.fth ============================================================================== --- cpu/arm/olpc/rm3150-touchscreen.fth Fri Aug 31 02:44:16 2012 (r3264) +++ cpu/arm/olpc/rm3150-touchscreen.fth Fri Aug 31 08:19:41 2012 (r3265) @@ -120,7 +120,7 @@ cursor-off
\ Consume already-queued keys to prevent premature exit - begin key? while key drop repeat + consume
\ Consume already-queued trackpad events to prevent premature exit d# 100 0 do
Modified: cpu/arm/olpc/touchscreen-common.fth ============================================================================== --- cpu/arm/olpc/touchscreen-common.fth Fri Aug 31 02:44:16 2012 (r3264) +++ cpu/arm/olpc/touchscreen-common.fth Fri Aug 31 08:19:41 2012 (r3265) @@ -166,6 +166,10 @@ key? dup if key drop then ( exit? ) ;
+: consume + begin key? while key drop repeat +; + 0 value pressure
\ LICENSE_BEGIN