Ver Fonte

RP2040: Use platform_poll() to make initiator mode logging more real-time.

Petteri Aimonen há 2 anos atrás
pai
commit
33f74ab683
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      src/BlueSCSI_initiator.cpp

+ 6 - 0
src/BlueSCSI_initiator.cpp

@@ -316,6 +316,8 @@ int scsiInitiatorRunCommand(int target_id,
     int status = -1;
     while ((phase = (SCSI_PHASE)scsiHostPhyGetPhase()) != BUS_FREE)
     {
+        platform_poll();
+
         if (phase == MESSAGE_IN)
         {
             uint8_t dummy = 0;
@@ -674,6 +676,8 @@ bool scsiInitiatorReadDataToFile(int target_id, uint32_t start_sector, uint32_t
 
     while (true)
     {
+        platform_poll();
+
         phase = (SCSI_PHASE)scsiHostPhyGetPhase();
         if (phase != DATA_IN && phase != BUS_BUSY)
         {
@@ -708,6 +712,8 @@ bool scsiInitiatorReadDataToFile(int target_id, uint32_t start_sector, uint32_t
 
     while ((phase = (SCSI_PHASE)scsiHostPhyGetPhase()) != BUS_FREE)
     {
+        platform_poll();
+
         if (phase == MESSAGE_IN)
         {
             uint8_t dummy = 0;