*\r
* \section Sec_ChangeLogXXXXXX Version XXXXXX\r
*\r
+ * \section Sec_ChangeLog100219 Version 100219\r
+ *\r
* <b>New:</b>\r
* - Added TPI programming support for 6-pin ATTINY devices to the AVRISP programmer project (thanks to Tom Light)\r
* - Added command timeout counter to the AVRISP project so that the device no longer freezes when incorrectly connected\r
* to the next version released. It does not indicate all new additions to the library in each version change, only\r
* areas relevant to making older projects compatible with the API changes of each new release.\r
*\r
- * \section Sec_MigrationXXXXXX Migrating from 091223 to XXXXXX\r
+ * \section Sec_MigrationXXXXXX Migrating from 100219 to XXXXXX\r
+ *\r
+ * \section Sec_Migration100219 Migrating from 091223 to 100219\r
*\r
* <b>Non-USB Library Components</b>\r
* - Due to some ADC channels not being identical to their ADC MUX selection masks for single-ended conversions on some AVR models,\r
/** Initialization function for the DHCP client. */\r
void DHCPClientApp_Init(void)\r
{\r
- /* Create an IP address to the broadcast network address */\r
- uip_ipaddr_t DHCPServerIPAddress;\r
- uip_ipaddr(&DHCPServerIPAddress, 255, 255, 255, 255);\r
-\r
/* Create a new UDP connection to the DHCP server port for the DHCP solicitation */\r
- struct uip_udp_conn* Connection = uip_udp_new(&DHCPServerIPAddress, HTONS(DHCPC_SERVER_PORT));\r
+ struct uip_udp_conn* Connection = uip_udp_new(&uip_broadcast_addr, HTONS(DHCPC_SERVER_PORT));\r
\r
/* If the connection was successfully created, bind it to the local DHCP client port */\r
if (Connection != NULL)\r
\r
if (uip_aborted() || uip_timedout() || uip_closed())\r
{\r
- /* Connection is being terminated for some reason - close file handle */\r
- f_close(&AppState->HTTPServer.FileHandle);\r
- AppState->HTTPServer.FileOpen = false;\r
- \r
/* Lock to the closed state so that no further processing will occur on the connection */\r
- AppState->HTTPServer.CurrentState = WEBSERVER_STATE_Closed;\r
- AppState->HTTPServer.NextState = WEBSERVER_STATE_Closed;\r
+ AppState->HTTPServer.CurrentState = WEBSERVER_STATE_Closing;\r
+ AppState->HTTPServer.NextState = WEBSERVER_STATE_Closing;\r
}\r
\r
if (uip_connected())\r
HTTPServerApp_SendData();\r
break;\r
case WEBSERVER_STATE_Closing:\r
+ /* Connection is being terminated for some reason - close file handle */\r
+ f_close(&AppState->HTTPServer.FileHandle);\r
+ AppState->HTTPServer.FileOpen = false;\r
+ \r
+ /* If connection is not already closed, close it */\r
uip_close();\r
\r
- AppState->HTTPServer.NextState = WEBSERVER_STATE_Closed;\r
+ AppState->HTTPServer.CurrentState = WEBSERVER_STATE_Closed;\r
+ AppState->HTTPServer.NextState = WEBSERVER_STATE_Closed;\r
break;\r
} \r
} \r