Device mode class driver callbacks are now fired before the control request status...
[pub/USBasp.git] / Projects / Webserver / Webserver.h
index f3aa8d7..4fb5b37 100644 (file)
                #include <avr/wdt.h>\r
                #include <avr/pgmspace.h>\r
                #include <avr/power.h>\r
+               #include <avr/interrupt.h>\r
 \r
                #include <LUFA/Version.h>\r
-               #include <LUFA/Drivers/Misc/TerminalCodes.h>\r
                #include <LUFA/Drivers/Board/LEDs.h>\r
+               #include <LUFA/Drivers/Board/Dataflash.h>\r
+               #include <LUFA/Drivers/Peripheral/SPI.h>\r
                #include <LUFA/Drivers/USB/USB.h>\r
-               #include <LUFA/Drivers/USB/Class/RNDIS.h>\r
                \r
-               #include <uip.h>\r
-               #include <uip_arp.h>\r
-               #include <timer.h>\r
-               \r
-               #include "Lib/WebserverApp.h"\r
+               #include "USBDeviceMode.h"\r
+               #include "USBHostMode.h"\r
                \r
        /* Macros: */\r
-               /** IP address that the webserver should use once connected to a RNDIS device. */\r
-               #define DEVICE_IP_ADDRESS         192, 168, 1, 10\r
-               \r
-               /** Netmask that the webserver should once connected to a RNDIS device. */\r
-               #define DEVICE_NETMASK            255, 255, 255, 0\r
-               \r
-               /** IP address of the default gateway the webserver should use when routing outside the local subnet. */\r
-               #define DEVICE_GATEWAY            192, 168, 1, 1\r
-\r
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */\r
-               #define LEDMASK_USB_NOTREADY      LEDS_LED1\r
+               #define LEDMASK_USB_NOTREADY          LEDS_LED1\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */\r
-               #define LEDMASK_USB_ENUMERATING  (LEDS_LED2 | LEDS_LED3)\r
+               #define LEDMASK_USB_ENUMERATING      (LEDS_LED1 | LEDS_LED2)\r
 \r
                /** LED mask for the library LED driver, to indicate that the USB interface is ready. */\r
-               #define LEDMASK_USB_READY        (LEDS_LED2 | LEDS_LED4)\r
+               #define LEDMASK_USB_READY             LEDS_LED2\r
 \r
                /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
-               #define LEDMASK_USB_ERROR        (LEDS_LED1 | LEDS_LED3)\r
+               #define LEDMASK_USB_ERROR            (LEDS_LED1 | LEDS_LED3)\r
                \r
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
-               #define LEDMASK_USB_BUSY          LEDS_LED2\r
-               \r
+               #define LEDMASK_USB_BUSY             (LEDS_LED1 | LEDS_LED3 | LEDS_LED4)\r
+\r
+               /** LED mask for the uIP stack idling with no IP configuration */\r
+               #define LEDMASK_UIP_READY_NOCONFIG    LEDS_LED3\r
+\r
+               /** LED mask for the uIP stack idling with a valid IP configuration */\r
+               #define LEDMASK_UIP_READY_CONFIG      LEDS_LED4\r
+\r
        /* Function Prototypes: */\r
                void SetupHardware(void);\r
-               void ProcessIncommingPacket(void);\r
-               void ManageConnections(void);\r
-       \r
-               void EVENT_USB_Host_HostError(const uint8_t ErrorCode);\r
-               void EVENT_USB_Host_DeviceAttached(void);\r
-               void EVENT_USB_Host_DeviceUnattached(void);\r
-               void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);\r
-               void EVENT_USB_Host_DeviceEnumerationComplete(void);\r
                \r
 #endif\r