Added Dataflash operational checks and aborts to all projects using the Dataflash...
authorDean Camera <dean@fourwalledcubicle.com>
Fri, 9 Mar 2012 22:02:29 +0000 (22:02 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Fri, 9 Mar 2012 22:02:29 +0000 (22:02 +0000)
Demos/Device/ClassDriver/MassStorage/MassStorage.c
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
Demos/Device/LowLevel/MassStorage/MassStorage.c
LUFA/DoxygenPages/ChangeLog.txt
Maintenance/makefile
Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c
Projects/TempDataLogger/TempDataLogger.c

index 55afed1..6a720f9 100644 (file)
@@ -92,6 +92,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();
 }
index 9f1c5c9..bfdf09c 100644 (file)
@@ -117,6 +117,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();
 }
index 13c34d9..d8ffea8 100644 (file)
@@ -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();
 }
index e58ac74..947636c 100644 (file)
@@ -80,6 +80,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();
 }
index d806c6e..c769c07 100644 (file)
@@ -12,6 +12,7 @@
   *   - Added support for the BitWizard Multio and Big-Multio boards
   *  - Library Applications:
   *   - Modified the CDC Host demos to set a default CDC Line Encoding on enumerated devices
+  *   - Added Dataflash operational checks and aborts to all projects using the Dataflash to ensure it is working correctly before use
   *
   *  <b>Changed:</b>
   *  - Core:
index d723078..ae40fd7 100644 (file)
@@ -23,12 +23,6 @@ upgrade-doxygen:
        done;\r
        @echo Doxygen configuration update complete.\r
 \r
-# Validate the working branch - compile all documentation, demos/projects/examples and run build tests\r
-validate-branch:\r
-       make -s -C $(LUFA_ROOT) doxygen\r
-       make -s -C $(LUFA_ROOT) all     \r
-       make -s -C $(LUFA_ROOT)/BuildTests all\r
-\r
 # Check the working branch documentation, ensure no placeholder values\r
 check-documentation-placeholders:\r
        @echo Checking for release suitability...\r
@@ -42,5 +36,11 @@ check-documentation-placeholders:
        fi;\r
        @echo Done.\r
 \r
+# Validate the working branch - compile all documentation, demos/projects/examples and run build tests\r
+validate-branch:\r
+       make -s -C $(LUFA_ROOT) doxygen\r
+       make -s -C $(LUFA_ROOT) all     \r
+       make -s -C $(LUFA_ROOT)/BuildTests all\r
+\r
 # Validate the working branch for general release, check for placeholder documentation then build and test everything\r
-validate-release: check-documentation-placeholders validate-branch
\ No newline at end of file
+validate-release: check-documentation-placeholders validate-branch\r
index cc79a83..86318e9 100644 (file)
@@ -155,6 +155,13 @@ void SetupHardware(void)
        Serial_CreateStream(NULL);
 
        #if defined(USB_CAN_BE_DEVICE)
+       /* 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();
        #endif
index 258bfc3..83590b3 100644 (file)
@@ -207,6 +207,13 @@ void SetupHardware(void)
        TCCR1B  = (1 << WGM12) | (1 << CS12) | (1 << CS10);
        TIMSK1  = (1 << OCIE1A);
 
+       /* 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();
 }