aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/TempDataLogger/TempDataLogger.c
diff options
context:
space:
mode:
Diffstat (limited to 'Projects/TempDataLogger/TempDataLogger.c')
-rw-r--r--Projects/TempDataLogger/TempDataLogger.c7
1 files changed, 7 insertions, 0 deletions
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();
}