/* Task to manage an enumerated USB RNDIS device once connected, to display device received data packets.  */
void RNDISHost_Task(void)
/* Task to manage an enumerated USB RNDIS device once connected, to display device received data packets.  */
void RNDISHost_Task(void)
{
	if (USB_HostState != HOST_STATE_Configured)
	  return;
	if (RNDIS_Host_IsPacketReceived(&Ethernet_RNDIS_Interface))
	{
		LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
		uint16_t PacketLength;
		RNDIS_Host_ReadPacket(&Ethernet_RNDIS_Interface, &PacketBuffer, &PacketLength);
		printf_P(PSTR("***PACKET (Size %d)***\r\n"), PacketLength);
		for (uint16_t i = 0; i < PacketLength; i++)
		  printf("0x%02x ", PacketBuffer[i]);
		printf_P(PSTR("\r\n\r\n"));
		LEDs_SetAllLEDs(LEDMASK_USB_READY);
	}
}