diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 0ef0fbc95dee45d0e27b5136db2c43c60404219d..cdffd3c47b11507ff396617cb265b4b06e6807f7 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -16,6 +16,7 @@ * for PDI and TPI programming * - Increased the speed of both software and hardware TPI/PDI programming modes of the AVRISP project * - Added a timeout value to the TWI_StartTransmission() function, within which the addressed device must respond + * - Webserver project now uses the board LEDs to indicate the current IP configuration state * * <b>Fixed:</b> * - Fixed software PDI/TPI programming mode in the AVRISP project not correctly toggling just the clock pin diff --git a/LUFA/ManPages/LUFAPoweredProjects.txt b/LUFA/ManPages/LUFAPoweredProjects.txt index 9fd0c5faa1dddc060b1969f508a3bb8bbb859857..2d6feac35d4b23a4598b8555b28e9eb0ceb79111 100644 --- a/LUFA/ManPages/LUFAPoweredProjects.txt +++ b/LUFA/ManPages/LUFAPoweredProjects.txt @@ -24,6 +24,7 @@ * - Micropendous, an open design/source set of AVR USB development boards: http://micropendous.org/ * - Nanduino, a do-it-yourself AT90USB162 board: http://www.makestuff.eu/wordpress/?page_id=569 * - Teensy and Teensy++, two other AVR USB development boards: http://www.pjrc.com/teensy/index.html + * - U2DIL/U4DIL, a set of DIP layout USB AVR boards: http://www.reworld.eu/re/en/products/u2dil/ * - USB10 AKA "The Ferret", a AT90USB162 development board: http://www.soc-machines.com * - USBFoo, an AT90USB162 based development board: http://shop.kernelconcepts.de/product_info.php?products_id=102 * diff --git a/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/diskio.c b/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/diskio.c index bcf1674f98524a258cdb2ac255f842d40a6bdc73..c0393dd84cb20f892bb5cad1746dd82282c2d522 100644 --- a/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/diskio.c +++ b/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/diskio.c @@ -41,8 +41,6 @@ DRESULT disk_readp ( ErrorCode = RES_NOTRDY; else if (MS_Host_ReadDeviceBlocks(&DiskHost_MS_Interface, 0, sector, 1, 512, BlockTemp)) ErrorCode = RES_ERROR; - - MS_Host_ReadDeviceBlocks(&DiskHost_MS_Interface, 0, sector, 1, 512, BlockTemp); #endif } else diff --git a/Projects/Webserver/Lib/DHCPClientApp.c b/Projects/Webserver/Lib/DHCPClientApp.c index cf512734e5527dc007b61480c54227eaa722ef20..01cbb7e264867b845f75280ac2cce1afce329a4a 100644 --- a/Projects/Webserver/Lib/DHCPClientApp.c +++ b/Projects/Webserver/Lib/DHCPClientApp.c @@ -156,7 +156,10 @@ void DHCPClientApp_Callback(void) uip_setnetmask((uip_ipaddr_t*)&AppState->DHCPClient.DHCPOffer_Data.Netmask); uip_setdraddr((uip_ipaddr_t*)&AppState->DHCPClient.DHCPOffer_Data.GatewayIP); - AppState->DHCPClient.CurrentState = DHCP_STATE_AddressLeased; + /* Indicate to the user that we now have a valid IP configuration */ + HaveIPConfiguration = true; + + AppState->DHCPClient.CurrentState = DHCP_STATE_AddressLeased; } break; diff --git a/Projects/Webserver/Lib/HTTPServerApp.c b/Projects/Webserver/Lib/HTTPServerApp.c index 4e00952f366e09f0ec4fc451a7f60663087f80c7..1a1d2c4bf6fb29e43e0403de078697c7e41d6c04 100644 --- a/Projects/Webserver/Lib/HTTPServerApp.c +++ b/Projects/Webserver/Lib/HTTPServerApp.c @@ -77,7 +77,7 @@ const MIME_Type_t MIMETypes[] = {.Extension = "pdf", .MIMEType = "application/pdf"}, }; -/** FAT Fs structure to hold the internal state of the FAT driver for the dataflash contents. */ +/** FATFs structure to hold the internal state of the FAT driver for the dataflash contents. */ FATFS DiskFATState; diff --git a/Projects/Webserver/Lib/uIPManagement.c b/Projects/Webserver/Lib/uIPManagement.c index bd7804e6e7a6a05c0019d44c364a23414600b0a9..3a9db3462e107cf4548bb29e25ef445eb32f02a7 100644 --- a/Projects/Webserver/Lib/uIPManagement.c +++ b/Projects/Webserver/Lib/uIPManagement.c @@ -46,6 +46,7 @@ struct timer ARPTimer; /** MAC address of the RNDIS device, when enumerated */ struct uip_eth_addr MACAddress; +bool HaveIPConfiguration; /** Configures the uIP stack ready for network traffic. */ void uIPManagement_Init(void) @@ -62,8 +63,10 @@ void uIPManagement_Init(void) /* DHCP/Server IP Settings Initialization */ #if defined(ENABLE_DHCP_CLIENT) + HaveIPConfiguration = false; DHCPClientApp_Init(); #else + HaveIPConfiguration = true; uip_ipaddr_t IPAddress, Netmask, GatewayIPAddress; uip_ipaddr(&IPAddress, DEVICE_IP_ADDRESS[0], DEVICE_IP_ADDRESS[1], DEVICE_IP_ADDRESS[2], DEVICE_IP_ADDRESS[3]); uip_ipaddr(&Netmask, DEVICE_NETMASK[0], DEVICE_NETMASK[1], DEVICE_NETMASK[2], DEVICE_NETMASK[3]); @@ -169,7 +172,7 @@ static void uIPManagement_ProcessIncomingPacket(void) } } - LEDs_SetAllLEDs(LEDMASK_USB_READY); + LEDs_SetAllLEDs(LEDMASK_USB_READY | ((HaveIPConfiguration) ? LEDMASK_UIP_READY : LEDMASK_UIP_READY_NOCONFIG)); } /** Manages the currently open network connections, including TCP and (if enabled) UDP. */ diff --git a/Projects/Webserver/Lib/uIPManagement.h b/Projects/Webserver/Lib/uIPManagement.h index 90b47ede9bd7287b8a5ac15b7fcd3d68272d66e3..ed02374f50cffff902d9c007ae5d33fdd6a5d339 100644 --- a/Projects/Webserver/Lib/uIPManagement.h +++ b/Projects/Webserver/Lib/uIPManagement.h @@ -63,6 +63,8 @@ /* External Variables: */ extern struct uip_eth_addr MACAddress; + extern bool HaveIPConfiguration; + /* Function Prototypes: */ void uIPManagement_Init(void); void uIPManagement_ManageNetwork(void); diff --git a/Projects/Webserver/Webserver.h b/Projects/Webserver/Webserver.h index a9621e32fad16b2b00c82ab69bf6e97cf89a65f5..f1351d8913ab165df24e02c3baa3568d31892272 100644 --- a/Projects/Webserver/Webserver.h +++ b/Projects/Webserver/Webserver.h @@ -53,19 +53,25 @@ /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ - #define LEDMASK_USB_NOTREADY LEDS_LED1 + #define LEDMASK_USB_NOTREADY LEDS_LED1 /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */ - #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3) + #define LEDMASK_USB_ENUMERATING (LEDS_LED1 | LEDS_LED2) /** LED mask for the library LED driver, to indicate that the USB interface is ready. */ - #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4) + #define LEDMASK_USB_READY LEDS_LED2 /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */ - #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3) + #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3) /** LED mask for the library LED driver, to indicate that the USB interface is busy. */ - #define LEDMASK_USB_BUSY LEDS_LED2 + #define LEDMASK_USB_BUSY (LEDS_LED1 | LEDS_LED3 | LEDS_LED4) + + /** LED mask for the uIP stack idling with no IP configuration */ + #define LEDMASK_UIP_READY_NOCONFIG LEDS_LED3 + + /** LED mask for the uIP stack idling with a valid IP configuration */ + #define LEDMASK_UIP_READY_CONFIG LEDS_LED4 /* Function Prototypes: */ void SetupHardware(void); diff --git a/makefile b/makefile index 2c7aeeed63efb1d45ce313a9bcbc3a2c939a40b0..421c077486e3a1bd7ec53addbed663ddf13340b6 100644 --- a/makefile +++ b/makefile @@ -13,18 +13,14 @@ # "make doxygen" to document everything with DoxyGen (if installed) and # "make clean_doxygen" to remove generated Doxygen documentation from everything. -# It is suggested that for the master build, the --quiet switch is passed to make, -# to remove all the commands from the output. This gives a much easier to read -# report of the entire build process. - all: %: @echo Executing \"make $@\" on all LUFA library elements. @echo - make -C LUFA/ $@ - make -C Demos/ $@ - make -C Projects/ $@ - make -C Bootloaders/ $@ + make -C LUFA/ $@ -s + make -C Demos/ $@ -s + make -C Projects/ $@ -s + make -C Bootloaders/ $@ -s @echo @echo LUFA \"make $@\" operation complete.