|
|
@ -46,6 +46,7 @@ struct timer ARPTimer;
|
|
|
|
/** MAC address of the RNDIS device, when enumerated */
|
|
|
|
/** MAC address of the RNDIS device, when enumerated */
|
|
|
|
struct uip_eth_addr MACAddress;
|
|
|
|
struct uip_eth_addr MACAddress;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool HaveIPConfiguration;
|
|
|
|
|
|
|
|
|
|
|
|
/** Configures the uIP stack ready for network traffic. */
|
|
|
|
/** Configures the uIP stack ready for network traffic. */
|
|
|
|
void uIPManagement_Init(void)
|
|
|
|
void uIPManagement_Init(void)
|
|
|
@ -62,8 +63,10 @@ void uIPManagement_Init(void)
|
|
|
|
|
|
|
|
|
|
|
|
/* DHCP/Server IP Settings Initialization */
|
|
|
|
/* DHCP/Server IP Settings Initialization */
|
|
|
|
#if defined(ENABLE_DHCP_CLIENT)
|
|
|
|
#if defined(ENABLE_DHCP_CLIENT)
|
|
|
|
|
|
|
|
HaveIPConfiguration = false;
|
|
|
|
DHCPClientApp_Init();
|
|
|
|
DHCPClientApp_Init();
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
|
|
|
|
HaveIPConfiguration = true;
|
|
|
|
uip_ipaddr_t IPAddress, Netmask, GatewayIPAddress;
|
|
|
|
uip_ipaddr_t IPAddress, Netmask, GatewayIPAddress;
|
|
|
|
uip_ipaddr(&IPAddress, DEVICE_IP_ADDRESS[0], DEVICE_IP_ADDRESS[1], DEVICE_IP_ADDRESS[2], DEVICE_IP_ADDRESS[3]);
|
|
|
|
uip_ipaddr(&IPAddress, DEVICE_IP_ADDRESS[0], DEVICE_IP_ADDRESS[1], DEVICE_IP_ADDRESS[2], DEVICE_IP_ADDRESS[3]);
|
|
|
|
uip_ipaddr(&Netmask, DEVICE_NETMASK[0], DEVICE_NETMASK[1], DEVICE_NETMASK[2], DEVICE_NETMASK[3]);
|
|
|
|
uip_ipaddr(&Netmask, DEVICE_NETMASK[0], DEVICE_NETMASK[1], DEVICE_NETMASK[2], DEVICE_NETMASK[3]);
|
|
|
@ -169,7 +172,7 @@ static void uIPManagement_ProcessIncomingPacket(void)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
LEDs_SetAllLEDs(LEDMASK_USB_READY);
|
|
|
|
LEDs_SetAllLEDs(LEDMASK_USB_READY | ((HaveIPConfiguration) ? LEDMASK_UIP_READY : LEDMASK_UIP_READY_NOCONFIG));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** Manages the currently open network connections, including TCP and (if enabled) UDP. */
|
|
|
|
/** Manages the currently open network connections, including TCP and (if enabled) UDP. */
|
|
|
|