Update UC3 platform driver support to use the bitmasks defined in the header files...
[pub/USBasp.git] / Projects / TempDataLogger / TempDataLogger.c
index ecea2fb..e0a0893 100644 (file)
@@ -151,10 +151,6 @@ int main(void)
        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;
-
        for (;;)
        {
                MS_Device_USBTask(&Disk_MS_Interface);
@@ -204,7 +200,7 @@ void SetupHardware(void)
        Temperature_Init();
        Dataflash_Init();
        USB_Init();
-       TWI_Init();
+       TWI_Init(TWI_BIT_PRESCALE_4, (F_CPU / 4 / 50000) / 2);
 
        /* 500ms logging interval timer configuration */
        OCR1A   = (((F_CPU / 1024) / 2) - 1);
@@ -298,7 +294,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
  *  \param[in] HIDInterfaceInfo  Pointer to the HID class interface configuration structure being referenced
  *  \param[in] ReportID    Report ID of the received report from the host
  *  \param[in] ReportType  The type of report that the host has sent, either HID_REPORT_ITEM_Out or HID_REPORT_ITEM_Feature
- *  \param[in] ReportData  Pointer to a buffer where the created report has been stored
+ *  \param[in] ReportData  Pointer to a buffer where the received report has been stored
  *  \param[in] ReportSize  Size in bytes of the received HID report
  */
 void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,