Changeset 3414
- Timestamp:
- Nov 3, 2012 3:34:49 AM (7 months ago)
- Location:
- cpu/arm/olpc
- Files:
-
- 2 edited
-
4.0/nn-version.fth (modified) (1 diff)
-
nnflash.fth (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cpu/arm/olpc/4.0/nn-version.fth
r3402 r3414 1 1 \ 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. 2 macro: NN_VERSION 0_0_0_7 -
cpu/arm/olpc/nnflash.fth
r3404 r3414 1 1 \ See license at end of file 2 2 purpose: 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 ; 3 22 4 23 : get-touchscreen-version ( -- version.d ) … … 7 26 " get-version" 2 pick $call-method ( handle version.d ) 8 27 >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<= 9 36 ; 10 37 … … 16 43 : flash-nn ( "filename" -- ) safe-parse-word ?enough-power reflash-nn ; 17 44 : 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 file20 get-touchscreen-version \ 20ms first time, 270ms subsequent21 d<=22 ;23 45 24 46 : update-nn-flash ( -- ) … … 33 55 \ XO-4 B1 have clear lightguides incompatible with later versions 34 56 \ 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 36 59 nn-image$ nn-up-to-date? 0= 37 60 ;
Note: See TracChangeset
for help on using the changeset viewer.
