Skip to content

Commit

Permalink
Merge pull request #332 from ZuluSCSI/fix-sd-wrap-timeout
Browse files Browse the repository at this point in the history
Fix SD card IO timeout wrapping
  • Loading branch information
aperezbios authored Nov 4, 2023
2 parents 8966933 + bb65774 commit 4cba22e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ZuluSCSI_platform_RP2040/sd_card_sdio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ bool SdioCard::stopTransmission(bool blocking)
}
else
{
uint32_t end = millis() + 5000;
while (millis() < end && isBusy())
uint32_t start = millis();
while ((uint32_t)(millis() - start) < 5000 && isBusy())
{
if (m_stream_callback)
{
Expand Down

0 comments on commit 4cba22e

Please sign in to comment.