Add extra LUFA TAR archive export exclusions.
[pub/USBasp.git] / Demos / Device / ClassDriver / VirtualSerialMassStorage / VirtualSerialMassStorage.c
index 975067f..d8ffea8 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2011.
+     Copyright (C) Dean Camera, 2012.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
@@ -59,7 +59,7 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
                                .NotificationEndpointDoubleBank = false,
                        },
        };
-       
+
 /** LUFA Mass Storage Class driver interface configuration and state information. This structure is
  *  passed to all Mass Storage Class driver functions, so that multiple instances of the same class
  *  within a device can be differentiated from one another.
@@ -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();
 }
@@ -211,3 +218,4 @@ bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSI
 
        return CommandSuccess;
 }
+