X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/8de8d7ab5a280ed9fc062c4bbc0f43350de1f383..3ea356a72054b540e1c529fee5f55b10324254a4:/Projects/TempDataLogger/TempDataLogger.c diff --git a/Projects/TempDataLogger/TempDataLogger.c b/Projects/TempDataLogger/TempDataLogger.c index 258bfc386..83590b311 100644 --- a/Projects/TempDataLogger/TempDataLogger.c +++ b/Projects/TempDataLogger/TempDataLogger.c @@ -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(); }