1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-06 03:40:54 +11:00
collapseos/blk/596
Virgil Dupras 495d2819d2 recipes/rc2014/sdcard: make spi relay design multi-devices
Also, fix the SPI relay driver to properly AND-away the result of
the CTL read.

Tested with a real prototype, works fine.
2020-09-18 19:22:56 -04:00

14 lines
277 B
Plaintext

CODE (spix) ( n -- n )
HL POP, chkPS, A L LDrr,
SPI_DATA OUTiA,
( wait until xchg is done )
BEGIN, SPI_CTL INAi, 1 ANDi, JRNZ, AGAIN,
SPI_DATA INAi,
L A LDrr,
HL PUSH,
;CODE
CODE (spie) ( n -- )
HL POP, chkPS, A L LDrr,
SPI_CTL OUTiA,
;CODE