mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 22:08:05 +11:00
495d2819d2
Also, fix the SPI relay driver to properly AND-away the result of the CTL read. Tested with a real prototype, works fine.
14 lines
277 B
Plaintext
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
|