1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-20 20:18:05 +11:00
collapseos/blk/609
Virgil Dupras f09aa0603c rc2014: separate SPI relay and SDC drivers
My intention is to reuse the SPI relay to program AVR MCUs from a
RC2014.
2020-06-29 18:48:00 -04:00

16 lines
432 B
Plaintext

( cmd arg1 arg2 -- r )
( Send a command that expects a R1 response, handling CS. )
: SDCMDR1 (spie) _cmd (spid) ;
( cmd arg1 arg2 -- r arg1 arg2 )
( Send a command that expects a R7 response, handling CS. A R7
is a R1 followed by 4 bytes. arg1 contains bytes 0:1, arg2
has 2:3 )
: SDCMDR7
(spie)
_cmd ( r )
_idle 8 LSHIFT _idle + ( r arg1 )
_idle 8 LSHIFT _idle + ( r arg1 arg2 )
(spid)
;