n8vem-mark4: devsdspi - save another two bytes! collect the whole set!
authorWill Sowerbutts <will@sowerbutts.com>
Sat, 31 Jan 2015 00:07:36 +0000 (00:07 +0000)
committerWill Sowerbutts <will@sowerbutts.com>
Sat, 31 Jan 2015 00:07:36 +0000 (00:07 +0000)
Kernel/platform-n8vem-mark4/devsdspi.c

index f4a8632..4fd88f3 100644 (file)
@@ -146,8 +146,7 @@ waitrx:
         ld bc, #512                             ; sector size
         or a
         push af                                 ; stash is_user flag now in Z bit (we cannot load it again after we remap)
-        jr z, rxnextbyte
-        call map_process_always                 ; map user process
+        call nz, map_process_always             ; map user process
 rxnextbyte:
         dec bc                  ; length--
         ld a, b
@@ -196,8 +195,7 @@ bool sd_spi_transmit_sector(uint8_t drive) __naked
         ld hl, #512                             ; sector size
         or a
         push af                                 ; stash is_user flag now in Z bit (we cannot load it again after we remap)
-        jr z, gotransmit
-        call map_process_always                 ; map user process
+        call nz, map_process_always             ; map user process
 gotransmit:
         in0 a, (_CSIO_CNTR)
         and #0xDF               ; mask off RE bit