From 3ea356a72054b540e1c529fee5f55b10324254a4 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Fri, 9 Mar 2012 22:02:29 +0000 Subject: Added Dataflash operational checks and aborts to all projects using the Dataflash to ensure it is working correctly before use. --- Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Projects/Incomplete/StandaloneProgrammer') diff --git a/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c b/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c index cc79a8321..86318e9cb 100644 --- a/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c +++ b/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c @@ -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 -- cgit v1.2.3