diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-05-26 10:50:22 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-05-26 10:50:22 +0000 |
commit | edc4db41f46f473fc0ba95fd03920d10aba1de4a (patch) | |
tree | 8c0ba2b40572eca4b206533651a36f6df529aec6 /Projects | |
parent | f0ff633962185d8b09a442750651dd763b38eda8 (diff) | |
download | lufa-edc4db41f46f473fc0ba95fd03920d10aba1de4a.tar.gz lufa-edc4db41f46f473fc0ba95fd03920d10aba1de4a.tar.bz2 lufa-edc4db41f46f473fc0ba95fd03920d10aba1de4a.zip |
Update Webserver project to remove DHCP IP configuration status notification.
Diffstat (limited to 'Projects')
-rw-r--r-- | Projects/Webserver/Lib/DHCPClientApp.c | 3 | ||||
-rw-r--r-- | Projects/Webserver/Lib/TELNETServerApp.c | 2 | ||||
-rw-r--r-- | Projects/Webserver/Lib/uIPManagement.c | 8 | ||||
-rw-r--r-- | Projects/Webserver/Lib/uIPManagement.h | 2 | ||||
-rw-r--r-- | Projects/Webserver/USBDeviceMode.c | 6 | ||||
-rw-r--r-- | Projects/Webserver/Webserver.h | 6 |
6 files changed, 5 insertions, 22 deletions
diff --git a/Projects/Webserver/Lib/DHCPClientApp.c b/Projects/Webserver/Lib/DHCPClientApp.c index 6a2f02938..599def05b 100644 --- a/Projects/Webserver/Lib/DHCPClientApp.c +++ b/Projects/Webserver/Lib/DHCPClientApp.c @@ -157,9 +157,6 @@ void DHCPClientApp_Callback(void) uip_setnetmask((uip_ipaddr_t*)&AppState->DHCPClient.DHCPOffer_Data.Netmask); uip_setdraddr((uip_ipaddr_t*)&AppState->DHCPClient.DHCPOffer_Data.GatewayIP); - /* Indicate to the user that we now have a valid IP configuration */ - HaveIPConfiguration = true; - AppState->DHCPClient.CurrentState = DHCP_STATE_AddressLeased; } diff --git a/Projects/Webserver/Lib/TELNETServerApp.c b/Projects/Webserver/Lib/TELNETServerApp.c index 436a619fa..e6eba5364 100644 --- a/Projects/Webserver/Lib/TELNETServerApp.c +++ b/Projects/Webserver/Lib/TELNETServerApp.c @@ -146,7 +146,7 @@ static void TELNETServerApp_DisplayTCPConnections(void) if (CurrConnection->tcpstateflags != UIP_CLOSED) { /* Add the current connection's details to the out buffer */ - ResponseLen += sprintf_P(&AppData[ResponseLen], PSTR("%u) %02d.%02d.%02d.%02d (Local %u, Remote %u)\r\n"), + ResponseLen += sprintf_P(&AppData[ResponseLen], PSTR("%u) %d.%d.%d.%d (Local Port %u <=> Remote Port %u)\r\n"), ++ActiveConnCount, CurrConnection->ripaddr.u8[0], CurrConnection->ripaddr.u8[1], diff --git a/Projects/Webserver/Lib/uIPManagement.c b/Projects/Webserver/Lib/uIPManagement.c index 59045c06a..8bc27afb7 100644 --- a/Projects/Webserver/Lib/uIPManagement.c +++ b/Projects/Webserver/Lib/uIPManagement.c @@ -46,9 +46,6 @@ static struct timer ARPTimer; /** MAC address of the RNDIS device, when enumerated. */ struct uip_eth_addr MACAddress; -/** Indicates if an IP configuration has been set in the device. */ -bool HaveIPConfiguration; - /** Configures the uIP stack ready for network traffic processing. */ void uIPManagement_Init(void) @@ -76,7 +73,6 @@ void uIPManagement_Init(void) DHCPServerApp_Init(); #endif - 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]); @@ -88,10 +84,8 @@ void uIPManagement_Init(void) else { #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]); @@ -228,7 +222,7 @@ static void uIPManagement_ProcessIncomingPacket(void) } } - LEDs_SetAllLEDs(LEDMASK_USB_READY | ((HaveIPConfiguration) ? LEDMASK_UIP_READY_CONFIG : LEDMASK_UIP_READY_NOCONFIG)); + LEDs_SetAllLEDs(LEDMASK_USB_READY); } /** 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 c42e13225..8fe656d68 100644 --- a/Projects/Webserver/Lib/uIPManagement.h +++ b/Projects/Webserver/Lib/uIPManagement.h @@ -70,8 +70,6 @@ /* 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/USBDeviceMode.c b/Projects/Webserver/USBDeviceMode.c index f5856ebbd..54c626103 100644 --- a/Projects/Webserver/USBDeviceMode.c +++ b/Projects/Webserver/USBDeviceMode.c @@ -48,15 +48,15 @@ USB_ClassInfo_RNDIS_Device_t Ethernet_RNDIS_Interface_Device = .DataINEndpointNumber = CDC_TX_EPNUM, .DataINEndpointSize = CDC_TXRX_EPSIZE, - .DataINEndpointDoubleBank = false, + .DataINEndpointDoubleBank = true, .DataOUTEndpointNumber = CDC_RX_EPNUM, .DataOUTEndpointSize = CDC_TXRX_EPSIZE, - .DataOUTEndpointDoubleBank = false, + .DataOUTEndpointDoubleBank = true, .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM, .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, - .NotificationEndpointDoubleBank = false, + .NotificationEndpointDoubleBank = true, .AdapterVendorDescription = "LUFA RNDIS Adapter", .AdapterMACAddress = {{0x02, 0x00, 0x02, 0x00, 0x02, 0x00}}, diff --git a/Projects/Webserver/Webserver.h b/Projects/Webserver/Webserver.h index 8bd2c7a94..79c55a505 100644 --- a/Projects/Webserver/Webserver.h +++ b/Projects/Webserver/Webserver.h @@ -68,12 +68,6 @@ /** LED mask for the library LED driver, to indicate that the USB interface is busy. */ #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); |