Added Dataflash operational checks and aborts to all projects using the Dataflash to ensure it is working correctly before use.

This commit is contained in:
Dean Camera 2012-03-09 22:02:29 +00:00
parent 8de8d7ab5a
commit 3ea356a720
8 changed files with 50 additions and 7 deletions

View 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();
}