diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-03-09 22:02:29 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-03-09 22:02:29 +0000 |
commit | 3ea356a72054b540e1c529fee5f55b10324254a4 (patch) | |
tree | 53c0e2da94e0e9ba0bd48f709fc08e03ca89b506 /Projects/Incomplete/StandaloneProgrammer | |
parent | 8de8d7ab5a280ed9fc062c4bbc0f43350de1f383 (diff) | |
download | lufa-3ea356a72054b540e1c529fee5f55b10324254a4.tar.gz lufa-3ea356a72054b540e1c529fee5f55b10324254a4.tar.bz2 lufa-3ea356a72054b540e1c529fee5f55b10324254a4.zip |
Added Dataflash operational checks and aborts to all projects using the Dataflash to ensure it is working correctly before use.
Diffstat (limited to 'Projects/Incomplete/StandaloneProgrammer')
-rw-r--r-- | Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 |