Add FatFS library to the Webserver project, extend the HTTP server so that it now serves files from the Dataflash. Add Mass Storage device mode class driver so that files can be loaded to the board Dataflash when inserted into a PC.
This commit is contained in:
parent
d26a9ed5fd
commit
d11ed10c53
31 changed files with 9603 additions and 465 deletions
|
@ -44,28 +44,14 @@
|
|||
|
||||
#include <LUFA/Version.h>
|
||||
#include <LUFA/Drivers/Board/LEDs.h>
|
||||
#include <LUFA/Drivers/Board/Dataflash.h>
|
||||
#include <LUFA/Drivers/Peripheral/SPI.h>
|
||||
#include <LUFA/Drivers/USB/USB.h>
|
||||
#include <LUFA/Drivers/USB/Class/RNDIS.h>
|
||||
|
||||
#include <uip.h>
|
||||
#include <uip_arp.h>
|
||||
#include <timer.h>
|
||||
|
||||
#include "Lib/WebserverApp.h"
|
||||
#include "Lib/DHCPApp.h"
|
||||
#include "USBDeviceMode.h"
|
||||
#include "USBHostMode.h"
|
||||
|
||||
/* Macros: */
|
||||
/** IP address that the webserver should use once connected to a RNDIS device (when DHCP is disabled). */
|
||||
#define DEVICE_IP_ADDRESS (uint8_t[]){192, 168, 1, 10}
|
||||
|
||||
/** Netmask that the webserver should once connected to a RNDIS device (when DHCP is disabled). */
|
||||
#define DEVICE_NETMASK (uint8_t[]){255, 255, 255, 0}
|
||||
|
||||
/** IP address of the default gateway the webserver should use when routing outside the local subnet
|
||||
* (when DHCP is disabled).
|
||||
*/
|
||||
#define DEVICE_GATEWAY (uint8_t[]){192, 168, 1, 1}
|
||||
|
||||
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
||||
#define LEDMASK_USB_NOTREADY LEDS_LED1
|
||||
|
||||
|
@ -80,19 +66,8 @@
|
|||
|
||||
/** LED mask for the library LED driver, to indicate that the USB interface is busy. */
|
||||
#define LEDMASK_USB_BUSY LEDS_LED2
|
||||
|
||||
/* External Variables: */
|
||||
extern struct uip_eth_addr MACAddress;
|
||||
|
||||
|
||||
/* Function Prototypes: */
|
||||
void SetupHardware(void);
|
||||
void ProcessIncommingPacket(void);
|
||||
void ManageConnections(void);
|
||||
|
||||
void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
|
||||
void EVENT_USB_Host_DeviceAttached(void);
|
||||
void EVENT_USB_Host_DeviceUnattached(void);
|
||||
void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
|
||||
void EVENT_USB_Host_DeviceEnumerationComplete(void);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue