/* Reset log tick counter to prepare for next logging interval */\r
CurrentLoggingTicks = 0;\r
\r
+ /* Only log when not connected to a USB host */\r
if (USB_DeviceState == DEVICE_STATE_Unattached)\r
{\r
uint8_t Day, Month, Year;\r
/* Fetch logging interval from EEPROM */\r
LoggingInterval500MS_SRAM = eeprom_read_byte(&LoggingInterval500MS_EEPROM);\r
\r
- LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
-\r
SetupHardware();\r
\r
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+\r
/* Mount and open the log file on the dataflash FAT partition */\r
OpenLogFile();\r
\r
/* Discard the first sample from the temperature sensor, as it is generally incorrect */\r
- uint8_t Dummy = Temperature_GetTemperature();\r
+ volatile uint8_t Dummy = Temperature_GetTemperature();\r
(void)Dummy;\r
\r
for (;;)\r
{\r
Device_Report_t* ReportParams = (Device_Report_t*)ReportData;\r
\r
- GPIOR0 = ReportParams->Day;\r
- GPIOR1 = ReportParams->Month;\r
- GPIOR2 = ReportParams->Year;\r
- \r
DS1307_SetDate(ReportParams->Day, ReportParams->Month, ReportParams->Year);\r
DS1307_SetTime(ReportParams->Hour, ReportParams->Minute, ReportParams->Second);\r
\r