Added master mode hardware TWI driver.
[pub/lufa.git] / Projects / Incomplete / Webserver / Webserver.c
index 97c35d7..c706fd0 100644 (file)
@@ -152,8 +152,8 @@ int main(void)
                                }\r
 \r
                                printf("MAC Address: 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X\r\n",\r
-                                       MACAddress.addr[0], MACAddress.addr[1], MACAddress.addr[2],\r
-                                       MACAddress.addr[3], MACAddress.addr[4], MACAddress.addr[5]);\r
+                                      MACAddress.addr[0], MACAddress.addr[1], MACAddress.addr[2],\r
+                                      MACAddress.addr[3], MACAddress.addr[4], MACAddress.addr[5]);\r
 \r
                                uip_setethaddr(MACAddress);\r
                                \r
@@ -179,7 +179,7 @@ void ProcessIncommingPacket(void)
                LEDs_SetAllLEDs(LEDMASK_USB_BUSY);\r
 \r
                /* Read the incomming packet straight into the UIP packet buffer */\r
-               RNDIS_Host_ReadPacket(&Ethernet_RNDIS_Interface, &uip_buf, &uip_len);\r
+               RNDIS_Host_ReadPacket(&Ethernet_RNDIS_Interface, uip_buf, &uip_len);\r
                \r
                printf("RECEIVED PACKET (%d):\r\n", uip_len);\r
                for (uint16_t i = 0; i < uip_len; i++)\r
@@ -207,7 +207,7 @@ void ProcessIncommingPacket(void)
 \r
                /* If a response was generated, send it */\r
                if (uip_len > 0)\r
-                 RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, &uip_buf, uip_len);\r
+                 RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);\r
 \r
                printf("SENT PACKET (%d):\r\n", uip_len);\r
                for (uint16_t i = 0; i < uip_len; i++)\r
@@ -220,6 +220,7 @@ void ProcessIncommingPacket(void)
 \r
 void ManageConnections(void)\r
 {\r
+       /* Manage open connections */\r
        if (timer_expired(&ConnectionTimer))\r
        {\r
                timer_reset(&ConnectionTimer);\r
@@ -233,12 +234,13 @@ void ManageConnections(void)
 \r
                        /* If a response was generated, send it */\r
                        if (uip_len > 0)\r
-                         RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, &uip_buf, uip_len);\r
+                         RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);\r
                }\r
                \r
                LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
        }\r
 \r
+       /* Manage ARP cache refreshing */\r
        if (timer_expired(&ARPTimer))\r
        {\r
                timer_reset(&ARPTimer);\r