Changeset 3414


Ignore:
Timestamp:
Nov 3, 2012, 3:34:49 AM (3 years ago)
Author:
quozl
Message:

OLPC XO-4 - touchscreen, switch to latest firmware 0.0.0.7 with missing IR PCB support, determine available version number from file, enable automatic reflash for wider testing (breaks manufacturing tests on B1).

Location:
cpu/arm/olpc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/olpc/4.0/nn-version.fth

    r3402 r3414  
    11\ The Neonode touchscreen firmware
    2 macro: NN_VERSION 0_0_0_6
    3 
    4 \ FIXME: change in nnflash.fth too, until it knows how to read it
    5 \ using Neonode's instructions.
     2macro: NN_VERSION 0_0_0_7
  • cpu/arm/olpc/nnflash.fth

    r3404 r3414  
    11\ See license at end of file
    22purpose: Reflash a Neonode touchscreen controller
     3
     4: (nnv)  ( version.d adr -- version.d )
     5   2 $number abort" nn.hex, not a number"
     6   >r 8 dlshift swap r> or swap
     7;
     8
     9: $nn-version  ( file$ -- version.d )
     10   $read-open           ( )
     11   3 0 do
     12      load-base d# 100 ifd @ read-line abort" nn.hex, read-line failed" 2drop
     13   loop
     14   load-base d# 25 +    ( adr )
     15   >r  0.               ( version.d  r: adr )
     16   r@ d#  2 + (nnv)  r@         (nnv)  r@ d#  6 + (nnv)  r@ d#  4 + (nnv)
     17   r@ d# 10 + (nnv)  r@ d#  8 + (nnv)  r@ d# 14 + (nnv)  r@ d# 12 + (nnv)
     18   r> drop              ( version.d )
     19   ifd @ fclose
     20   \ 59ms
     21;
    322
    423: get-touchscreen-version  ( -- version.d )
     
    726   " get-version" 2 pick $call-method          ( handle version.d )
    827   >r >r close-dev r> r>                       ( version.d )
     28   \ 20ms first time, 270ms subsequent
     29;
     30
     31: nn-up-to-date?  ( file$ -- flag )
     32   $nn-version                  ( version-in-file.d )
     33   2dup h# 0001.0000.0000.0000. d>= abort" nn.hex, major version conflict"
     34   get-touchscreen-version      ( version-in-file.d version-in-controller.d )
     35   d<=
    936;
    1037
     
    1643: flash-nn  ( "filename" -- )  safe-parse-word  ?enough-power  reflash-nn  ;
    1744: flash-nn! ( "filename" -- )  safe-parse-word                 reflash-nn  ;
    18 : nn-up-to-date?  ( file$ -- flag )
    19    2drop  h# 0000.0000.0000.0006.  \ FIXME: get version from file
    20    get-touchscreen-version   \ 20ms first time, 270ms subsequent
    21    d<=
    22 ;
    2345
    2446: update-nn-flash  ( -- )
     
    3355   \ XO-4 B1 have clear lightguides incompatible with later versions
    3456   \ of touchscreen firmware.
    35    board-revision h# 4b20  <  if  false exit  then
     57   \ (disabled temporarily so that automatic update can be tested)
     58   \ board-revision h# 4b20  <  if  false exit  then
    3659   nn-image$  nn-up-to-date?  0=
    3760;
Note: See TracChangeset for help on using the changeset viewer.