aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/TemperatureDataLogger
diff options
context:
space:
mode:
Diffstat (limited to 'Projects/TemperatureDataLogger')
-rw-r--r--Projects/TemperatureDataLogger/TempDataLogger.c9
-rw-r--r--Projects/TemperatureDataLogger/TempDataLogger.h1
2 files changed, 6 insertions, 4 deletions
diff --git a/Projects/TemperatureDataLogger/TempDataLogger.c b/Projects/TemperatureDataLogger/TempDataLogger.c
index 35bf68bd6..59105286e 100644
--- a/Projects/TemperatureDataLogger/TempDataLogger.c
+++ b/Projects/TemperatureDataLogger/TempDataLogger.c
@@ -137,16 +137,17 @@ ISR(TIMER1_COMPA_vect, ISR_BLOCK)
*/
int main(void)
{
- /* Fetch logging interval from EEPROM */
- LoggingInterval500MS_SRAM = eeprom_read_byte(&LoggingInterval500MS_EEPROM);
-
SetupHardware();
- LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+ /* Fetch logging interval from EEPROM */
+ LoggingInterval500MS_SRAM = eeprom_read_byte(&LoggingInterval500MS_EEPROM);
/* Mount and open the log file on the dataflash FAT partition */
OpenLogFile();
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+ sei();
+
/* Discard the first sample from the temperature sensor, as it is generally incorrect */
volatile uint8_t Dummy = Temperature_GetTemperature();
(void)Dummy;
diff --git a/Projects/TemperatureDataLogger/TempDataLogger.h b/Projects/TemperatureDataLogger/TempDataLogger.h
index 3f3a3c04e..a6e770bb0 100644
--- a/Projects/TemperatureDataLogger/TempDataLogger.h
+++ b/Projects/TemperatureDataLogger/TempDataLogger.h
@@ -40,6 +40,7 @@
#include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include <stdio.h>
#include "Descriptors.h"