In particular, spaces in assembly operands are bad since the
assembler believes everything after a space is comments.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
IDEDATA_L equ 0xFF58
SPIDATA equ 0xFF6C
-SPISTATUS equ SPIDATA + 1
+SPISTATUS equ SPIDATA+1
SPICTRL equ SPISTATUS
-SPICLK equ SPICTRL + 1
-SPISIE equ SPICLK + 1
+SPICLK equ SPICTRL+1
+SPISIE equ SPICLK+1
SPICS equ 0x01 ; hardcode SEL0 for now
lda #0x0F
sta SPISIE ; selects off, IRQs off
cmpa SPISIE
- beq nospi
+ bne nospi
lda SPIDATA ; clear TC
lda SPISTATUS
- bpl nospi ; TC not clear -> no spi present
+ bmi nospi ; TC not clear -> no spi present
sta SPIDATA ; start a transmit, TC should now be clear
lda SPISTATUS
- bmi spigood
+ bpl spigood
nospi: clrb
rts
spigood:
;
; For multiple cards these need to look at the card #
;
-_sd_spi_lower_cs:
+_sd_spi_raise_cs:
lda SPISIE
ora #SPICS
sta SPISIE
rts
-_sd_spi_raise_cs:
+_sd_spi_lower_cs:
lda SPISIE
anda #0xFF-SPICS
sta SPISIE