aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/VirtualSerialMassStorage
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/ClassDriver/VirtualSerialMassStorage')
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c b/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
index 13c34d942..d8ffea873 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
+++ b/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
@@ -131,6 +131,13 @@ void SetupHardware(void)
Dataflash_Init();
USB_Init();
+ /* Check if the Dataflash is working, abort if not */
+ if (!(DataflashManager_CheckDataflashOperation()))
+ {
+ LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ for(;;);
+ }
+
/* Clear Dataflash sector protections, if enabled */
DataflashManager_ResetDataflashProtections();
}