/*
LUFA Library
Copyright (C) Dean Camera, 2010.
-
+
dean [at] fourwalledcubicle [dot] com
- www.fourwalledcubicle.com
+ www.lufa-lib.org
*/
/*
Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
/* uIP Timing Initialization */
clock_init();
timer_set(&ConnectionTimer, CLOCK_SECOND / 2);
- timer_set(&ARPTimer, CLOCK_SECOND * 10);
+ timer_set(&ARPTimer, CLOCK_SECOND * 10);
/* uIP Stack Initialization */
uip_init();
uip_setnetmask(&Netmask);
uip_setdraddr(&GatewayIPAddress);
#endif
-
+
/* HTTP Webserver Initialization */
HTTPServerApp_Init();
-
+
/* TELNET Server Initialization */
#if defined(ENABLE_TELNET_SERVER)
TELNETServerApp_Init();
/* If no packet received, exit processing routine */
if (!(RNDIS_Host_IsPacketReceived(&Ethernet_RNDIS_Interface)))
return;
-
+
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
/* Read the Incoming packet straight into the UIP packet buffer */
uip_split_output();
}
-
+
break;
case HTONS(UIP_ETHTYPE_ARP):
/* Process ARP packet */
uip_arp_arpin();
-
+
/* If a response was generated, send it */
if (uip_len > 0)
uip_split_output();
-
+
break;
}
}
timer_reset(&ConnectionTimer);
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
-
+
for (uint8_t i = 0; i < UIP_CONNS; i++)
{
/* Run periodic connection management for each TCP connection */
uip_split_output();
}
}
-
+
#if defined(ENABLE_DHCP_CLIENT)
for (uint8_t i = 0; i < UIP_UDP_CONNS; i++)
{
uip_arp_timer();
}
}
+