aboutsummaryrefslogtreecommitdiff
path: root/Demos/Device/ClassDriver/VirtualSerialMassStorage
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-03-09 22:02:29 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-03-09 22:02:29 +0000
commit50bd690266588432561947355f52c663bd125a20 (patch)
tree53c0e2da94e0e9ba0bd48f709fc08e03ca89b506 /Demos/Device/ClassDriver/VirtualSerialMassStorage
parentda2ad10bb231507cde735fc3238d2662db6da854 (diff)
Added Dataflash operational checks and aborts to all projects using the Dataflash to ensure it is working correctly before use.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@2103 d5102386-fcda-11dd-9fdb-3debd5008f28
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 13c34d94..d8ffea87 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();
}