diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-05-22 08:28:40 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-05-22 08:28:40 +0000 |
commit | 3cba88e4c05d6a3c25ffa9c7185d41a84b7f72b1 (patch) | |
tree | f356fef599a6b9fd290f99ecf694b6f84f8a61b7 /Projects/Webserver/Lib/uip/uip-split.c | |
parent | e349974aa9fdd6679a385d0da66005a27706b275 (diff) | |
download | lufa-3cba88e4c05d6a3c25ffa9c7185d41a84b7f72b1.tar.gz lufa-3cba88e4c05d6a3c25ffa9c7185d41a84b7f72b1.tar.bz2 lufa-3cba88e4c05d6a3c25ffa9c7185d41a84b7f72b1.zip |
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.
Diffstat (limited to 'Projects/Webserver/Lib/uip/uip-split.c')
-rw-r--r-- | Projects/Webserver/Lib/uip/uip-split.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Projects/Webserver/Lib/uip/uip-split.c b/Projects/Webserver/Lib/uip/uip-split.c index 87dbd7e1f..5222a05b6 100644 --- a/Projects/Webserver/Lib/uip/uip-split.c +++ b/Projects/Webserver/Lib/uip/uip-split.c @@ -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 */ } |