Changeset 2989


Ignore:
Timestamp:
May 29, 2012, 8:44:37 PM (3 years ago)
Author:
wmb
Message:

OLPC trac #11902 - ALPS touchpad driver - use mouse emulation mode on initial open so the menu works, switching to ALPS mode only during selftest.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dev/olpc/touchpad/touchpad.fth

    r2865 r2989  
    7373;
    7474
     75variable mode  \ 0 - unknown  1 - GS  2 - PT  3 - mouse
     76
    7577\ Ref: 5.2.10 (2-1) of Hybrid-GP2B-T-1.pdf
    76 : advanced-mode  ( -- )  stream-off stream-off stream-off stream-off  ;  \ 4 f5 commands
     78: advanced-mode  ( -- )  stream-off stream-off stream-off stream-off  0 mode !  ;  \ 4 f5 commands
    7779
    7880\ Ref: 5.2.10 (2-2) of Hybrid-GP2B-T-1.pdf
    79 : mouse-mode  ( -- )  h# ff read2 drop drop  ;  \ Response is 0,aa
     81: mouse-mode  ( -- )    \ Response is 0,aa
     82   h# ff read2 drop drop
     83   stream-mode  3 mode !
     84;
    8085
    8186\ Send the common "three f2 commands" prefix.  "f2" is normally the
     
    8388: alps-prefix  ( -- )  3 0  do  h# f2 read1 drop  loop  ;
    8489
    85 variable mode  \ 0 - unknown  1 - GS  2 - PT  3 - mouse
    86900 instance value packet-type
    8791
     
    105109   setup
    106110   olpc-touchpad?  if
    107       0 mode !  advanced-mode stream-on
     111      advanced-mode stream-on
    108112   else
    109       stream-mode  3 mode !
     113      mouse-mode
    110114   then
    111115;
     
    114118\ method, so we can use advance-mode for the ALPS touchpad.
    115119
    116 patch start stream-mode open
     120patch mouse-mode stream-mode open
    117121
    118122
     
    543547      if  track  then
    544548   exit-test?  until
     549
     550   mouse-mode  \ Restore the standard mouse mode so the menu will work
    545551
    546552   close
Note: See TracChangeset for help on using the changeset viewer.