diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-01-19 00:25:26 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-01-19 00:25:26 +0000 |
commit | 27461546523862a3a76ee41f615f7ec2eed2195f (patch) | |
tree | d55f2b4c6ae2d3b148577d7a9b8b5832e65bfbdf /Projects | |
parent | c299552ab3ae6a6939b69323957d0aac79445278 (diff) | |
download | lufa-27461546523862a3a76ee41f615f7ec2eed2195f.tar.gz lufa-27461546523862a3a76ee41f615f7ec2eed2195f.tar.bz2 lufa-27461546523862a3a76ee41f615f7ec2eed2195f.zip |
Added master mode hardware TWI driver.
Fixed a bug in the incomplete Webserver project, where the packet data was not being written to and read from the correct buffer address.
Diffstat (limited to 'Projects')
-rw-r--r-- | Projects/Incomplete/Webserver/Webserver.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Projects/Incomplete/Webserver/Webserver.c b/Projects/Incomplete/Webserver/Webserver.c index 97c35d783..c706fd08a 100644 --- a/Projects/Incomplete/Webserver/Webserver.c +++ b/Projects/Incomplete/Webserver/Webserver.c @@ -152,8 +152,8 @@ int main(void) }
printf("MAC Address: 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X\r\n",
- MACAddress.addr[0], MACAddress.addr[1], MACAddress.addr[2],
- MACAddress.addr[3], MACAddress.addr[4], MACAddress.addr[5]);
+ MACAddress.addr[0], MACAddress.addr[1], MACAddress.addr[2],
+ MACAddress.addr[3], MACAddress.addr[4], MACAddress.addr[5]);
uip_setethaddr(MACAddress);
@@ -179,7 +179,7 @@ void ProcessIncommingPacket(void) LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
/* Read the incomming packet straight into the UIP packet buffer */
- RNDIS_Host_ReadPacket(&Ethernet_RNDIS_Interface, &uip_buf, &uip_len);
+ RNDIS_Host_ReadPacket(&Ethernet_RNDIS_Interface, uip_buf, &uip_len);
printf("RECEIVED PACKET (%d):\r\n", uip_len);
for (uint16_t i = 0; i < uip_len; i++)
@@ -207,7 +207,7 @@ void ProcessIncommingPacket(void) /* If a response was generated, send it */
if (uip_len > 0)
- RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, &uip_buf, uip_len);
+ RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);
printf("SENT PACKET (%d):\r\n", uip_len);
for (uint16_t i = 0; i < uip_len; i++)
@@ -220,6 +220,7 @@ void ProcessIncommingPacket(void) void ManageConnections(void)
{
+ /* Manage open connections */
if (timer_expired(&ConnectionTimer))
{
timer_reset(&ConnectionTimer);
@@ -233,12 +234,13 @@ void ManageConnections(void) /* If a response was generated, send it */
if (uip_len > 0)
- RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, &uip_buf, uip_len);
+ RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);
}
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
+ /* Manage ARP cache refreshing */
if (timer_expired(&ARPTimer))
{
timer_reset(&ARPTimer);
|