More v5.2 bug fixes
authorMichael McMaster <michael@codesrc.com>
Tue, 16 Mar 2021 13:13:06 +0000 (23:13 +1000)
committerMichael McMaster <michael@codesrc.com>
Tue, 16 Mar 2021 13:13:06 +0000 (23:13 +1000)
software/SCSI2SD/src/disk.c
software/SCSI2SD/src/flash.c
software/include/scsi2sd.h
software/scsi2sd-util/Makefile

index 540d098e8b879212fd971879b090661cb6fc37d1..48f589023ff5e3333f5d864b631ad3af5d94aba2 100755 (executable)
@@ -578,7 +578,7 @@ void scsiDiskPoll()
                        // work with.\r
                        int scsiBusy = 1;\r
                        int sdBusy = 1;\r
-                       while (scsiBusy && sdBusy)\r
+                       while (scsiBusy && sdBusy && isSDDevice)\r
                        {\r
                                uint8_t intr = CyEnterCriticalSection();\r
                                scsiBusy = scsiDMABusy();\r
index ed015d3db895b3c6feb77946d97752c8200e383b..0e6ba954581abc99c95e45fc13f5f411af7690c9 100644 (file)
@@ -123,7 +123,7 @@ static void spiFlash_earlyInit(S2S_Device* dev)
     }
 
     // Don't require the host to send us a START STOP UNIT command
-    spiFlash->dev.mediaState = MEDIA_STARTED;
+    spiFlash->dev.mediaState = MEDIA_STARTED | MEDIA_WP;
     
     // DMA stuff
        spiFlashDMATxChan =
index 8b60b3e7638638443678d43a9f61cba367fe9941..9c1665461f7b6e188aa506b45783d52d01882692 100755 (executable)
@@ -345,16 +345,18 @@ typedef enum
 
 
 
+#define TargetConfig S2S_TargetCfg
+#define BoardConfig S2S_BoardConfig
 
 #ifdef __cplusplus
 } // extern "C"
 
        #include <type_traits>
        static_assert(
-               std::is_pod<TargetConfig>::value, "Misuse of TargetConfig struct"
+               std::is_pod<S2S_TargetCfg>::value, "Misuse of TargetConfig struct"
                );
        static_assert(
-               sizeof(TargetConfig) == 4096,
+               sizeof(S2S_TargetCfg) == 4096,
                "TargetConfig struct size mismatch"
                );
 
index 548b07f3fcea3f31138ac94688f77dd62fed407d..64bdffde5c273f40313c3bc2f7697e4e6855adc8 100755 (executable)
@@ -82,6 +82,7 @@ ifeq ($(TARGET),Darwin)
        CC=clang -mmacosx-version-min=10.7
        CXX=clang++ -stdlib=libc++ -mmacosx-version-min=10.7
        WX_CONFIG += --with-macosx-version-min=10.7
+       CPPFLAGS_WXBUILD += -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1
        BUILD := $(PWD)/build/mac
 all: $(BUILD)/scsi2sd-util.dmg
 
@@ -156,7 +157,7 @@ endif
        mkdir -p $(dir $@)
        ( \
                cd $(dir $@) && \
-               $(CURDIR)/wxWidgets/configure $(WX_CONFIG) CPPFLAGS="$(CPPFLAGS_ZLIB)" LDFLAGS="$(LDFLAGS_ZLIB)" && \
+               $(CURDIR)/wxWidgets/configure $(WX_CONFIG) CPPFLAGS="$(CPPFLAGS_ZLIB) $(CPPFLAGS_WXBUILD)" LDFLAGS="$(LDFLAGS_ZLIB)" && \
                $(MAKE) \
        ) && \
        touch $@