Add RNDIS Device support to the Webserver project, so that the files stored on the device can be viewed from a web-browser while the board is plugged into a host machine.

This commit is contained in:
Dean Camera 2011-05-22 08:28:40 +00:00
parent e349974aa9
commit 3cba88e4c0
27 changed files with 939 additions and 251 deletions

View file

@ -83,7 +83,10 @@ uip_split_output(void)
#if UIP_CONF_IPV6
tcpip_ipv6_output();
#else
RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);
if (USB_CurrentMode == USB_MODE_Device)
RNDIS_Device_SendPacket(&Ethernet_RNDIS_Interface_Device, uip_buf, uip_len);
else
RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface_Host, uip_buf, uip_len);
#endif /* UIP_CONF_IPV6 */
/* Now, create the second packet. To do this, it is not enough to
@ -124,7 +127,10 @@ uip_split_output(void)
#if UIP_CONF_IPV6
tcpip_ipv6_output();
#else
RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);
if (USB_CurrentMode == USB_MODE_Device)
RNDIS_Device_SendPacket(&Ethernet_RNDIS_Interface_Device, uip_buf, uip_len);
else
RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface_Host, uip_buf, uip_len);
#endif /* UIP_CONF_IPV6 */
return;
}
@ -134,7 +140,10 @@ uip_split_output(void)
#if UIP_CONF_IPV6
tcpip_ipv6_output();
#else
RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);
if (USB_CurrentMode == USB_MODE_Device)
RNDIS_Device_SendPacket(&Ethernet_RNDIS_Interface_Device, uip_buf, uip_len);
else
RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface_Host, uip_buf, uip_len);
#endif /* UIP_CONF_IPV6 */
}