Changeset 2805
- Timestamp:
- Jan 10, 2012 2:45:52 AM (18 months ago)
- Location:
- cpu/arm/olpc
- Files:
-
- 2 edited
-
ecflash.fth (modified) (1 diff)
-
edi.fth (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cpu/arm/olpc/ecflash.fth
r2762 r2805 40 40 : ?reflash-ec-flags ( adr -- ) 41 41 use-edi-spi ( adr ) 42 spi-start( adr ) \ avoids holding EC in reset42 edi-open-active ( adr ) \ avoids holding EC in reset 43 43 load-base /flash-page ec-flags-offset edi-read-flash ( adr ) 44 44 dup load-base /flash-page comp ( adr different? ) -
cpu/arm/olpc/edi.fth
r2803 r2805 27 27 [ifndef] edi-wait-b 28 28 : edi-wait-b ( -- b ) \ Wait for and receive EC response byte 29 d# 10000 0 do 30 spi-in h# 50 = if 31 spi-in ( b ) 32 spi-cs-off ( b ) 33 unloop exit 34 then 29 d# 100 0 do 30 spi-in ( d ) 31 dup h# 5f <> if ( d ) 32 dup h# 50 = if ( d ) 33 drop 34 spi-in ( b ) 35 spi-cs-off ( b ) 36 unloop exit 37 then ( d ) 38 spi-cs-off ( d ) 39 h# ff = abort" EDI byte in inactive" 40 true abort" EDI byte in confused" 41 then ( d ) 42 drop 35 43 loop 36 44 spi-cs-off … … 228 236 \ fast-edi-clock \ Target speed up to 16 MHz 229 237 \ reset 238 ; 239 : edi-open-active ( -- ) 240 spi-start 241 ['] select-flash catch if select-flash then 230 242 ; 231 243
Note: See TracChangeset
for help on using the changeset viewer.
