/** Prints incomming packets from the attached RNDIS device to the serial port. */\r
void PrintIncommingPackets(void)\r
{\r
- uint16_t PacketLength;\r
- \r
- RNDIS_Host_ReadPacket(&Ethernet_RNDIS_Interface, &PacketBuffer, &PacketLength);\r
- \r
- if (PacketLength)\r
+ if (RNDIS_Host_IsPacketReceived(&Ethernet_RNDIS_Interface))\r
{\r
+ LEDs_SetAllLEDs(LEDMASK_USB_BUSY);\r
+\r
+ uint16_t PacketLength;\r
+ RNDIS_Host_ReadPacket(&Ethernet_RNDIS_Interface, &PacketBuffer, &PacketLength);\r
+ \r
printf("***PACKET (Size %d)***\r\n", PacketLength);\r
\r
for (uint16_t i = 0; i < PacketLength; i++)\r
printf("%02x ", PacketBuffer[i]);\r
\r
- printf("\r\n\r\n"); \r
+ printf("\r\n\r\n");\r
+ \r
+ LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
}\r
}\r
\r
/** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */\r
#define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)\r
\r
+ /** LED mask for the library LED driver, to indicate that the USB interface is busy. */\r
+ #define LEDMASK_USB_BUSY (LEDS_LED2)\r
+\r
/* Function Prototypes: */\r
void SetupHardware(void);\r
void PrintIncommingPackets(void);\r
* <table>\r
* <tr>\r
* <th width="100px">USB Class</th> \r
- * <th width="80px">Device</th> \r
- * <th width="80px">Host</th> \r
+ * <th width="90px">Device Mode</th> \r
+ * <th width="90px">Host Mode</th> \r
* </tr>\r
* <tr>\r
* <td>Audio</td>\r
* </tr>\r
* <tr>\r
* <td>Printer</td>\r
- * <td bgcolor="#00EE00">No</td>\r
+ * <td bgcolor="#EE0000">No</td>\r
* <td bgcolor="#00EE00">Yes</td>\r
* </tr>\r
* <tr>\r
* <td>RNDIS</td>\r
* <td bgcolor="#00EE00">Yes</td>\r
- * <td bgcolor="#EE0000">Yes</td>\r
+ * <td bgcolor="#00EE00">Yes</td>\r
* </tr>\r
* <tr>\r
* <td>Still Image</td>\r
* If you have an item to add to this list, please contact the library author via email, the LUFA mailing list,\r
* or post your suggestion as an enhancement request to the project bug tracker.\r
*\r
- * <b>Targeted for the Next Release (SVN Development Only):</b>\r
- *\r
* <b>Targeted for Future Releases:</b>\r
* - Code Features\r
* -# Add hub support when in Host mode for multiple devices\r
* -# Add ability to get number of bytes not written with pipe/endpoint write routines after an error\r
* -# Add standardized descriptor names to class driver structures\r
- * -# Finish RNDIS Host Class driver\r
* -# Correct mishandling of error cases in Mass Storage demos\r
* - Documentation/Support\r
* -# Remake AVRStudio project files\r