6502-OS/system/spi.h65

27 lines
666 B
Plaintext
Raw Normal View History

2023-12-23 14:17:49 +01:00
;;********************************************************************************
;; @module SPI-P
;; @type driver
;; @details
;; Support being a peripheral SPI device.
;; @depends IO-W65C22N
;;********************************************************************************
2023-12-08 22:56:35 +01:00
.ifndef INCLUDE_SPI
INCLUDE_SPI = 1
.include "system/system.h65"
.scope spi_p
SPI_IO = IO2
2023-12-23 14:17:49 +01:00
Import spi_p, begin_read, irq_read_byte, begin_write, irq_write_byte, end, recv_bytes, sent_bytes, status
.enum STATUS
XFER_SIZEL = %10000000
XFER_SIZEH = %01000000
XFER = %00000001
DONE = %00000000
ERROR = %11111111
.endenum
2023-12-08 22:56:35 +01:00
.endscope
.endif ; guard