diff --git a/cores/nRF5/usb/usb_msc_flash.c b/cores/nRF5/usb/usb_msc_flash.c index 4838bfb6..0d7ee88f 100644 --- a/cores/nRF5/usb/usb_msc_flash.c +++ b/cores/nRF5/usb/usb_msc_flash.c @@ -36,6 +36,9 @@ #if NRF52840_XXAA #include "tusb.h" + +#if CFG_TUD_MSC + #include "nrf_gpio.h" #include "flash/flash_qspi.h" @@ -128,4 +131,5 @@ void tud_msc_write10_complete_cb (uint8_t lun) flash_qspi_flush(); } -#endif +#endif // CFG_TUD_MSC +#endif // nrf52840 diff --git a/libraries/FileSystem/examples/External_Format/External_Format.ino b/libraries/FileSystem/examples/External_Format/External_Format.ino index 55408076..8b423515 100644 --- a/libraries/FileSystem/examples/External_Format/External_Format.ino +++ b/libraries/FileSystem/examples/External_Format/External_Format.ino @@ -26,10 +26,7 @@ void setup() // Wait for user input to run. Serial.println("This sketch will destroy all of your data in External Flash!"); Serial.print("Enter any keys to continue:"); - while ( !Serial.available() ) - { - delay(1); - } + while ( !Serial.available() ) delay(10); Serial.println(); Serial.println(); @@ -37,13 +34,11 @@ void setup() ExternalFS.begin(); Serial.print("Formating ..."); - delay(1); // Format without erase ExternalFS.format(true); Serial.println("Done"); - delay(1); } // the loop function runs over and over again forever diff --git a/libraries/FileSystem/src/fatfs/source/diskio.c b/libraries/FileSystem/src/fatfs/source/diskio.c index c1631af1..26710422 100644 --- a/libraries/FileSystem/src/fatfs/source/diskio.c +++ b/libraries/FileSystem/src/fatfs/source/diskio.c @@ -107,7 +107,7 @@ DRESULT disk_ioctl ( break; case GET_BLOCK_SIZE: - *((DWORD*) buff) = FLASH_QSPI_PAGE_SIZE / FF_MIN_SS; + *((DWORD*) buff) = (FLASH_QSPI_PAGE_SIZE / FF_MIN_SS); break; case CTRL_SYNC: