X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/9257f4ab8ea8ade1df5b576c114f715302051cc6..ceb16ee24f1e6add5e2ad0398369c24d2d868cd8:/Projects/TemperatureDataLogger/TempDataLogger.c diff --git a/Projects/TemperatureDataLogger/TempDataLogger.c b/Projects/TemperatureDataLogger/TempDataLogger.c index fbe32cea0..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; @@ -252,7 +253,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void) * * \param[in] MSInterfaceInfo Pointer to the Mass Storage class interface configuration structure being referenced */ -bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* MSInterfaceInfo) +bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) { bool CommandSuccess;