|
|
|
@ -146,7 +146,7 @@ int main(void)
|
|
|
|
|
USB_HostState = HOST_STATE_Configured;
|
|
|
|
|
break;
|
|
|
|
|
case HOST_STATE_Configured:
|
|
|
|
|
// TODO
|
|
|
|
|
PrintIncommingPackets();
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -156,6 +156,24 @@ int main(void)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Prints incomming packets from the attached RNDIS device to the serial port. */
|
|
|
|
|
void PrintIncommingPackets(void)
|
|
|
|
|
{
|
|
|
|
|
uint16_t PacketLength;
|
|
|
|
|
|
|
|
|
|
RNDIS_Host_ReadPacket(&Ethernet_RNDIS_Interface, &PacketBuffer, &PacketLength);
|
|
|
|
|
|
|
|
|
|
if (PacketLength)
|
|
|
|
|
{
|
|
|
|
|
printf("***PACKET (Size %d)***\r\n", PacketLength);
|
|
|
|
|
|
|
|
|
|
for (uint16_t i = 0; i < PacketLength; i++)
|
|
|
|
|
printf("%02x ", PacketBuffer[i]);
|
|
|
|
|
|
|
|
|
|
printf("\r\n\r\n");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
|
|
|
|
void SetupHardware(void)
|
|
|
|
|
{
|
|
|
|
|