Blame | Last modification | View Log | Download | RSS feed
ifndef __ez80spiinc__ez80spiinc equ 1__defspi macro NUM,BaseSPI{NUM}_CTL port Base+0 ; SPI n Control Register (r/w)if NUM<>"1"SPI_IRQ_EN equ 1 << 7 ; Interrupt enableSPI_EN equ 1 << 5 ; SPI enableMASTER_EN equ 1 << 4 ; Operate as masterCPOL equ 1 << 3 ; Clock PolarityCPHA equ 1 << 2 ; Clock PhaseendifSPI{NUM}_SR port Base+1 ; SPI n Status Register (r)if NUM<>"1"SPIF equ 1 << 7 ; SPI data transfer completedWCOL equ 1 << 6 ; Write CollisionMODF equ 1 << 4 ; Mode FaultendifSPI{NUM}_RBR port Base+2 ; SPI n Receive Buffer Register (r)SPI{NUM}_TSR port Base+2 ; SPI n Transmit Shift Register (w)endm ; __defspiendif ; __ez80spiinc