More v5.2 bug fixes

This commit is contained in:
Michael McMaster 2021-03-16 23:13:06 +10:00
parent 14ba62e8e3
commit 8becbd1827
4 changed files with 8 additions and 5 deletions

View File

@ -578,7 +578,7 @@ void scsiDiskPoll()
// work with.
int scsiBusy = 1;
int sdBusy = 1;
while (scsiBusy && sdBusy)
while (scsiBusy && sdBusy && isSDDevice)
{
uint8_t intr = CyEnterCriticalSection();
scsiBusy = scsiDMABusy();

View 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 =

View File

@ -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"
);

View File

@ -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 $@