1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 16:18:04 +11:00
collapseos/blk/595

16 lines
576 B
Plaintext
Raw Normal View History

SPI relay driver
This driver is designed for a ad-hoc adapter card that acts as a
SPI relay between the z80 bus and the SPI device. Sending any-
thing on SPI_CSLOW and SPI_CSHIGH is expected to select/deselect
the device, and writing to SPI_DATA is expected to initiate a
byte exchange. The result of the exchange is excpected to be re-
trieved by reading SPI_DATA.
You also need to define the exchange delay with SPI_DELAY. If
SPI clock is the same as system clock, 2 NOPs are enough:
: SPI_DELAY NOP, NOP, ;
Provides the SPI relay protocol. Load driver with "596 LOAD".