X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/3b6987bca3ef746fd9a5d4baec6d40b65c9b4101..ceb16ee24f1e6add5e2ad0398369c24d2d868cd8:/Projects/TemperatureDataLogger/TempDataLogger.c diff --git a/Projects/TemperatureDataLogger/TempDataLogger.c b/Projects/TemperatureDataLogger/TempDataLogger.c index 955359d45..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; @@ -299,10 +300,6 @@ void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDI { Device_Report_t* ReportParams = (Device_Report_t*)ReportData; - GPIOR0 = ReportParams->Day; - GPIOR1 = ReportParams->Month; - GPIOR2 = ReportParams->Year; - DS1307_SetDate(ReportParams->Day, ReportParams->Month, ReportParams->Year); DS1307_SetTime(ReportParams->Hour, ReportParams->Minute, ReportParams->Second);