projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e5057fe
)
Better checking of whether a packet is received in the RNDISEthernetHost Class driver...
author
Dean Camera
<dean@fourwalledcubicle.com>
Fri, 27 Nov 2009 06:32:26 +0000
(06:32 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Fri, 27 Nov 2009 06:32:26 +0000
(06:32 +0000)
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/USB.h
patch
|
blob
|
blame
|
history
LUFA/ManPages/FutureChanges.txt
patch
|
blob
|
blame
|
history
diff --git
a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
index
28d7b17
..
02dd46a
100644
(file)
--- a/
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
+++ b/
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
@@
-159,18
+159,21
@@
int main(void)
/** Prints incomming packets from the attached RNDIS device to the serial port. */
\r
void PrintIncommingPackets(void)
\r
{
\r
/** 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
{
\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("***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
}
\r
}
\r
\r
diff --git
a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h
b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h
index
5f84980
..
ea87648
100644
(file)
--- a/
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h
+++ b/
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h
@@
-63,6
+63,9
@@
/** 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 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
/* Function Prototypes: */
\r
void SetupHardware(void);
\r
void PrintIncommingPackets(void);
\r
diff --git
a/LUFA/Drivers/USB/USB.h
b/LUFA/Drivers/USB/USB.h
index
f1d7d5b
..
b40d6ab
100644
(file)
--- a/
LUFA/Drivers/USB/USB.h
+++ b/
LUFA/Drivers/USB/USB.h
@@
-83,8
+83,8
@@
* <table>
\r
* <tr>
\r
* <th width="100px">USB Class</th>
\r
* <table>
\r
* <tr>
\r
* <th width="100px">USB Class</th>
\r
- * <th width="
80px">Devic
e</th>
\r
- * <th width="
80px">Host
</th>
\r
+ * <th width="
90px">Device Mod
e</th>
\r
+ * <th width="
90px">Host Mode
</th>
\r
* </tr>
\r
* <tr>
\r
* <td>Audio</td>
\r
* </tr>
\r
* <tr>
\r
* <td>Audio</td>
\r
@@
-113,13
+113,13
@@
* </tr>
\r
* <tr>
\r
* <td>Printer</td>
\r
* </tr>
\r
* <tr>
\r
* <td>Printer</td>
\r
- * <td bgcolor="#
00EE
00">No</td>
\r
+ * <td bgcolor="#
EE00
00">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="#00EE00">Yes</td>
\r
* </tr>
\r
* <tr>
\r
* <td>RNDIS</td>
\r
* <td bgcolor="#00EE00">Yes</td>
\r
- * <td bgcolor="#
EE00
00">Yes</td>
\r
+ * <td bgcolor="#
00EE
00">Yes</td>
\r
* </tr>
\r
* <tr>
\r
* <td>Still Image</td>
\r
* </tr>
\r
* <tr>
\r
* <td>Still Image</td>
\r
diff --git
a/LUFA/ManPages/FutureChanges.txt
b/LUFA/ManPages/FutureChanges.txt
index
112c980
..
12e972c
100644
(file)
--- a/
LUFA/ManPages/FutureChanges.txt
+++ b/
LUFA/ManPages/FutureChanges.txt
@@
-11,14
+11,11
@@
* 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
* 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
* <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
* -# Correct mishandling of error cases in Mass Storage demos
\r
* - Documentation/Support
\r
* -# Remake AVRStudio project files
\r