From 5f1a6507d8f7a0f9ecea179f94aeb182eac77cfe Mon Sep 17 00:00:00 2001 From: jacqueline Date: Mon, 8 Apr 2024 13:50:35 +1000 Subject: Warn and block MSC disable if the sd card is busy --- src/drivers/include/samd.hpp | 4 ++-- src/drivers/samd.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/include/samd.hpp b/src/drivers/include/samd.hpp index ac265950..55ea513c 100644 --- a/src/drivers/include/samd.hpp +++ b/src/drivers/include/samd.hpp @@ -48,8 +48,8 @@ class Samd { // There is a compatible usb host attached, but USB MSC is not currently // in use by the SAMD. kAttachedIdle, - // The SAMD is currently exposing the SD card via USB MSC. - kAttachedMounted, + // The SAMD is currently writing to the SD card via USB MSC. + kAttachedBusy, }; auto GetUsbStatus() -> UsbStatus; diff --git a/src/drivers/samd.cpp b/src/drivers/samd.cpp index b631b4fb..e47d9cfe 100644 --- a/src/drivers/samd.cpp +++ b/src/drivers/samd.cpp @@ -113,7 +113,7 @@ auto Samd::UpdateUsbStatus() -> void { usb_status_ = UsbStatus::kDetached; } usb_status_ = - (raw_res & 0b10) ? UsbStatus::kAttachedMounted : UsbStatus::kAttachedIdle; + (raw_res & 0b10) ? UsbStatus::kAttachedBusy : UsbStatus::kAttachedIdle; } auto Samd::ResetToFlashSamd() -> void { -- cgit v1.2.3