Changeset 2367
- Timestamp:
- Jul 14, 2011 2:54:21 PM (23 months ago)
- File:
-
- 1 edited
-
dev/olpc/kb3700/spicmd.fth (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dev/olpc/kb3700/spicmd.fth
r2325 r2367 262 262 pulse-ack 263 263 ; 264 : ?do-ack ( -- ) 265 \ If there is more data in the FIFO, it means that the EC 266 \ timed out and "inferred" an ACK, so we don't ACK until 267 \ the FIFO is empty. 268 ssp-ready? 0= if prime-fifo pulse-ack then 269 ; 264 270 : (upstream) ( -- ) 265 271 ssp-ssdr rl@ ssp-ssdr rl@ ( channel# data ) … … 268 274 then 269 275 over case ( channel# data ) 270 0 of 2drop prime-fifo pulse-ack endof( channel# data ) \ Invalid276 0 of 2drop ?do-ack endof ( channel# data ) \ Invalid 271 277 1 of 2drop handoff-command endof ( channel# data ) \ Switched 272 278 ( default ) ( channel# data channel# ) 273 enque prime-fifo pulse-ack( channel# )279 enque ?do-ack ( channel# ) 274 280 endcase 275 281 ; … … 332 338 ; 333 339 340 : drain ( -- ) 341 begin ssp-ready? while poll repeat 342 ; 334 343 : data-command ( databuf datalen datain? cmdadr cmdlen more? -- ) 335 344 to sticky? to cmdlen to cmdbuf … … 339 348 set-cmd-timeout 340 349 ['] do-state behavior ['] upstream = if 350 drain 341 351 set-cmd 342 352 else
Note: See TracChangeset
for help on using the changeset viewer.
