*/\r
 int main(void)\r
 {\r
-       /* Fetch logging interval from EEPROM */\r
-       LoggingInterval500MS_SRAM = eeprom_read_byte(&LoggingInterval500MS_EEPROM);\r
-\r
        SetupHardware();\r
 \r
-       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+       /* Fetch logging interval from EEPROM */\r
+       LoggingInterval500MS_SRAM = eeprom_read_byte(&LoggingInterval500MS_EEPROM);\r
 \r
        /* Mount and open the log file on the dataflash FAT partition */\r
        OpenLogFile();\r
 \r
+       LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+       sei();\r
+\r
        /* Discard the first sample from the temperature sensor, as it is generally incorrect */\r
        volatile uint8_t Dummy = Temperature_GetTemperature();\r
        (void)Dummy;\r
  *\r
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface configuration structure being referenced\r
  */\r
-bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)\r
+bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)\r
 {\r
        bool CommandSuccess;\r
        \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