Add FatFS library to the Webserver project, extend the HTTP server so that it now...
[pub/USBasp.git] / Projects / TemperatureDataLogger / TempDataLogger.h
index 2389cd7..ee10a09 100644 (file)
@@ -1,13 +1,13 @@
 /*\r
              LUFA Library\r
 /*\r
              LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
+     Copyright (C) Dean Camera, 2010.\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
                #include <avr/io.h>\r
                #include <avr/wdt.h>\r
                #include <avr/power.h>\r
                #include <avr/io.h>\r
                #include <avr/wdt.h>\r
                #include <avr/power.h>\r
-\r
+               #include <stdio.h>\r
+               \r
                #include "Descriptors.h"\r
 \r
                #include "Lib/SCSI.h"\r
                #include "Lib/DataflashManager.h"\r
                #include "Lib/FATFs/ff.h"\r
                #include "Descriptors.h"\r
 \r
                #include "Lib/SCSI.h"\r
                #include "Lib/DataflashManager.h"\r
                #include "Lib/FATFs/ff.h"\r
+               #include "Lib/DS1307.h"\r
 \r
                #include <LUFA/Version.h>\r
                #include <LUFA/Drivers/Board/LEDs.h>\r
 \r
                #include <LUFA/Version.h>\r
                #include <LUFA/Drivers/Board/LEDs.h>\r
@@ -53,6 +55,7 @@
                #include <LUFA/Drivers/Peripheral/ADC.h>\r
                #include <LUFA/Drivers/USB/USB.h>\r
                #include <LUFA/Drivers/USB/Class/MassStorage.h>\r
                #include <LUFA/Drivers/Peripheral/ADC.h>\r
                #include <LUFA/Drivers/USB/USB.h>\r
                #include <LUFA/Drivers/USB/Class/MassStorage.h>\r
+               #include <LUFA/Drivers/USB/Class/HID.h>\r
 \r
        /* Macros: */\r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
 \r
        /* Macros: */\r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
                /** Data log interval between samples, in tens of milliseconds */\r
                #define LOG_INTERVAL_10MS        1000\r
                \r
                /** Data log interval between samples, in tens of milliseconds */\r
                #define LOG_INTERVAL_10MS        1000\r
                \r
+       /* Type Defines: */\r
+               typedef struct\r
+               {\r
+                       uint8_t Day;\r
+                       uint8_t Month;\r
+                       uint8_t Year;\r
+\r
+                       uint8_t Hour;\r
+                       uint8_t Minute;\r
+                       uint8_t Second;\r
+                       \r
+                       uint8_t LogInterval500MS;\r
+               } Device_Report_t;\r
+\r
        /* Function Prototypes: */\r
                void SetupHardware(void);\r
        /* Function Prototypes: */\r
                void SetupHardware(void);\r
+               void OpenLogFile(void);\r
+               void CloseLogFile(void);\r
 \r
                void EVENT_USB_Device_Connect(void);\r
                void EVENT_USB_Device_Disconnect(void);\r
 \r
                void EVENT_USB_Device_Connect(void);\r
                void EVENT_USB_Device_Disconnect(void);\r
                void EVENT_USB_Device_UnhandledControlRequest(void);\r
 \r
                bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);\r
                void EVENT_USB_Device_UnhandledControlRequest(void);\r
 \r
                bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);\r
+               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,\r
+                                                 const uint8_t ReportType, void* ReportData, uint16_t* ReportSize);\r
+               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, \r
+                                                         const void* ReportData, const uint16_t ReportSize);\r
 \r
 #endif\r
 \r
 #endif\r