Changeset 2896


Ignore:
Timestamp:
Mar 16, 2012, 11:18:06 PM (2 years ago)
Author:
wmb
Message:

OLPC XO-1.75 - trac #11704 - Raydium touchscreen driver - calibrate touchscreen during selftest and don't hang indefinitely if the touchscreen is spewing events.

Location:
cpu/arm/olpc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/olpc/exc7200-touchscreen.fth

    r2893 r2896  
    5454      pad?  if  . . . . . cr  then 
    5555   key? until 
     56   key drop 
    5657; 
    5758 
  • cpu/arm/olpc/rm3150-touchscreen.fth

    r2893 r2896  
    9696: discard-n  ( .. #events -- )   5 *  0  ?do  drop  loop  ; 
    9797 
     98\ Needs 2 seconds of no-touch 
     99: calibrate  ( -- )  h# 20 0 ts-b!  ; 
     100 
    98101: selftest  ( -- error? ) 
    99102   open  0=  if 
     
    105108   smt-test?  if  close false exit  then 
    106109 
    107    final-test? 0=  if 
     110   calibrate   \ Needs 2 seconds of no-touch 
     111 
     112   targets?  if 
     113      ." Calibrating touchscreen" cr 
     114      d# 2000 ms 
     115   else 
    108116      ." Touchscreen test will start in 4 seconds" cr 
    109117      d# 4000 ms 
     
    116124 
    117125   \ Consume already-queued trackpad events to prevent premature exit 
    118    begin  pad-events  ?dup  while  discard-n  repeat 
     126   d# 100 0  do 
     127      pad-events  ?dup  0=  if  leave  then  ( .. #events ) 
     128      discard-n                              ( ) 
     129   loop 
    119130 
    120131   background 
  • cpu/arm/olpc/touchscreen-common.fth

    r2893 r2896  
    144144; 
    145145 
    146 : handle-key  ( -- exit? )  true  ; 
    147  
    148146false value selftest-failed?  \ Success/failure flag for final test mode 
    149147: exit-test?  ( -- flag ) 
     
    166164 
    167165   \ If not final test mode, we only exit via a key - no targets 
    168    key?  if  handle-key  else  false  then  ( exit ? ) 
     166   key?  dup  if  key drop  then      ( exit? ) 
    169167; 
    170168 
Note: See TracChangeset for help on using the changeset viewer.