@@ -24,13 +24,13 @@ enum TestTypes : uint8_t
2424
2525// !!! TEST CONFIGURATION !!! -->
2626
27- constexpr enum TestTypes selectedTest = TEST_PORTENTA_C33_SDCARD ;
27+ constexpr enum TestTypes selectedTest = TEST_PORTENTA_C33_USB ;
2828
2929// Notice that formtting tests can take a while to complete
3030
3131// Uncomment the line below to include testing of LITTLEFS and FAT formatting with mkfs():
3232
33- // #define PERFORM_FORMATTING_TESTS
33+ #define PERFORM_FORMATTING_TESTS
3434
3535// <-- !!! TEST CONFIGURATION !!!
3636
@@ -461,29 +461,33 @@ void setup() {
461461 (void ) umount (deviceName);
462462 // <-- Persistent storage test
463463
464- // Wait for USB thumb drive removal -->
465- if (DEV_USB == deviceName )
464+ // These tests can't be performed on the Opta because we log to USB
465+ if (TEST_OPTA_USB != selectedTest )
466466 {
467- Serial.println ();
468- Serial.println (" Please remove the thumb drive" );
469- (void ) register_unplug_callback (DEV_USB, usbCallback2);
470- while (false == usbDetached) {
471- delay (500 );
467+ // Wait for USB thumb drive removal -->
468+ if (DEV_USB == deviceName)
469+ {
470+ Serial.println ();
471+ Serial.println (" Please remove the thumb drive" );
472+ (void ) register_unplug_callback (DEV_USB, usbCallback2);
473+ while (false == usbDetached) {
474+ delay (500 );
475+ }
476+ Serial.println (" Thank you!" );
472477 }
473- Serial.println (" Thank you!" );
474- }
475- // <-- Wait for USB thumb drive removal
478+ // <-- Wait for USB thumb drive removal
476479
477- if (DEV_USB == deviceName)
478- {
479- // Register multiple callbacks test (unplug) -->
480- retVal = register_unplug_callback (DEV_USB, usbCallback2);
481- if ((-1 != retVal) || (EBUSY != errno))
480+ if (DEV_USB == deviceName)
482481 {
483- allTestsOk = false ;
484- Serial.println (" [FAIL] Register multiple callbacks test failed (unplug)" );
482+ // Register multiple callbacks test (unplug) -->
483+ retVal = register_unplug_callback (DEV_USB, usbCallback2);
484+ if ((-1 != retVal) || (EBUSY != errno))
485+ {
486+ allTestsOk = false ;
487+ Serial.println (" [FAIL] Register multiple callbacks test failed (unplug)" );
488+ }
489+ // <-- Register multiple callbacks test (unplug)
485490 }
486- // <-- Register multiple callbacks test (unplug)
487491 }
488492
489493 // Final report -->
0 commit comments