Quellcode durchsuchen

Merge branch 'main' into feature/merge-rp2xxx-libs

Morio vor 1 Jahr
Ursprung
Commit
ec7e7b1bac
5 geänderte Dateien mit 20 neuen und 5 gelöschten Zeilen
  1. 0 1
      lib/ZuluSCSI_platform_RP2MCU/sdio.cpp
  2. 1 3
      platformio.ini
  3. 6 0
      src/ZuluSCSI_cdrom.cpp
  4. 1 1
      src/ZuluSCSI_config.h
  5. 12 0
      src/ZuluSCSI_disk.cpp

+ 0 - 1
lib/ZuluSCSI_platform_RP2MCU/sdio.cpp

@@ -188,7 +188,6 @@ waitagain:
     return SDIO_OK;
 }
 
-
 /*******************************************************
  * Basic SDIO command execution
  *******************************************************/

+ 1 - 3
platformio.ini

@@ -298,10 +298,8 @@ board = zuluscsi_RP2350A
 program_flash_allocation = 360448
 linker_script_template = lib/ZuluSCSI_platform_RP2MCU/rp23xx-template.ld
 ldscript_bootloader = lib/ZuluSCSI_platform_RP2MCU/rp23xx_btldr.ld
-debug_build_flags =
-    ${env:ZuluSCSI_RP2MCU.debug_build_flags}
 build_flags =
     ${env:ZuluSCSI_RP2MCU.build_flags}
     -DZULUSCSI_RP2350A
     -DZULUSCSI_MCU_RP23XX
-    -DROMDRIVE_OFFSET=${env:ZuluSCSI_RP2350A.program_flash_allocation}
+    -DROMDRIVE_OFFSET=${env:ZuluSCSI_RP2350A.program_flash_allocation}

+ 6 - 0
src/ZuluSCSI_cdrom.cpp

@@ -1721,6 +1721,12 @@ static void doReadCD(uint32_t lba, uint32_t length, uint8_t sector_type,
         }
         assert(buf == bufstart + result_length);
         scsiStartWrite(bufstart, result_length);
+
+        // Reset the watchdog while the transfer is progressing.
+        // If the host stops transferring, the watchdog will eventually expire.
+        // This is needed to avoid hitting the watchdog if the host performs
+        // a large transfer compared to its transfer speed.
+        platform_reset_watchdog();
     }
 
     scsiFinishWrite();

+ 1 - 1
src/ZuluSCSI_config.h

@@ -28,7 +28,7 @@
 #include <ZuluSCSI_platform.h>
 
 // Use variables for version number
-#define FW_VER_NUM      "24.10.28"
+#define FW_VER_NUM      "24.11.01"
 #define FW_VER_SUFFIX   "devel"
 
 #define ZULU_FW_VERSION FW_VER_NUM "-" FW_VER_SUFFIX

+ 12 - 0
src/ZuluSCSI_disk.cpp

@@ -1671,6 +1671,12 @@ void diskDataOut()
             }
             platform_set_sd_callback(NULL, NULL);
             g_disk_transfer.bytes_sd += len;
+
+            // Reset the watchdog while the transfer is progressing.
+            // If the host stops transferring, the watchdog will eventually expire.
+            // This is needed to avoid hitting the watchdog if the host performs
+            // a large transfer compared to its transfer speed.
+            platform_reset_watchdog();
         }
     }
 
@@ -1844,6 +1850,12 @@ static void start_dataInTransfer(uint8_t *buffer, uint32_t count)
 
     platform_poll();
     diskEjectButtonUpdate(false);
+
+    // Reset the watchdog while the transfer is progressing.
+    // If the host stops transferring, the watchdog will eventually expire.
+    // This is needed to avoid hitting the watchdog if the host performs
+    // a large transfer compared to its transfer speed.
+    platform_reset_watchdog();
 }
 
 static void diskDataIn()