Fixed RNDISEthenet demo checking the incorrect message field for packet size constrai...
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 13 Apr 2009 06:58:46 +0000 (06:58 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 13 Apr 2009 06:58:46 +0000 (06:58 +0000)
Fixed WriteNextReport code in the GenericHIDHost demo using incorrect parameter types and not selecting the correct endpoint.

Demos/Device/RNDISEthernet/RNDISEthernet.c
Demos/Host/GenericHIDHost/GenericHIDHost.c
Demos/Host/GenericHIDHost/GenericHIDHost.h
LUFA/ChangeLog.txt

index 78c77c8..d573a76 100644 (file)
@@ -284,7 +284,7 @@ TASK(RNDIS_Task)
                        Endpoint_Read_Stream_LE(&RNDISPacketHeader, sizeof(RNDIS_PACKET_MSG_t));\r
 \r
                        /* Stall the request if the data is too large */\r
-                       if (RNDISPacketHeader.MessageLength > ETHERNET_FRAME_SIZE_MAX)\r
+                       if (RNDISPacketHeader.DataLength > ETHERNET_FRAME_SIZE_MAX)\r
                        {\r
                                Endpoint_StallTransaction();\r
                                return;\r
index 778b8f6..605fc6f 100644 (file)
@@ -221,10 +221,10 @@ void ReadNextReport(void)
  *  \param ReportOUTData  Buffer containing the report to send to the device\r
  *  \param ReportLength  Length of the report to send\r
  */\r
-void WriteNextReport(uint8_t ReportOUTData, uint16_t ReportLength)\r
+void WriteNextReport(uint8_t* ReportOUTData, uint16_t ReportLength)\r
 {\r
        /* Select and unfreeze HID data OUT pipe */\r
-       Pipe_SelectPipe(HID_DATA_IN_PIPE);\r
+       Pipe_SelectPipe(HID_DATA_OUT_PIPE);\r
        \r
        /* Not all HID devices have an OUT endpoint (some require OUT reports to be sent over the\r
         * control endpoint instead) - check to see if the OUT endpoint has been initialized */\r
@@ -242,7 +242,7 @@ void WriteNextReport(uint8_t ReportOUTData, uint16_t ReportLength)
                }\r
 \r
                /* Read in HID report data */\r
-               Pipe_Write_Stream_LE(&ReportOUTData, ReportLength);                             \r
+               Pipe_Write_Stream_LE(ReportOUTData, ReportLength);                              \r
                        \r
                /* Clear the OUT endpoint, send last data packet */\r
                Pipe_ClearCurrentBank();\r
index f3005e5..d0f3e7a 100644 (file)
@@ -88,6 +88,6 @@
        /* Function Prototypes: */\r
                void UpdateStatus(uint8_t CurrentStatus);\r
                void ReadNextReport(void);\r
-               void WriteNextReport(uint8_t ReportOUTData, uint16_t ReportLength);\r
+               void WriteNextReport(uint8_t* ReportOUTData, uint16_t ReportLength);\r
                \r
 #endif\r
index 64182b0..e2d699c 100644 (file)
@@ -27,6 +27,8 @@
   *  - Added support to the CDCHost demo for devices with mutiple CDC interfaces which are not the correct ACM type preceeding the desired\r
   *    ACM CDC interface\r
   *  - Fixed GenericHID demo not starting USB and HID management tasks when not using interrupt driven modes (thanks to Carl Kjeldsen)\r
+  *  - Fixed RNDISEthenet demo checking the incorrect message field for packet size constraints (thanks to Jonathan)\r
+  *  - Fixed WriteNextReport code in the GenericHIDHost demo using incorrect parameter types and not selecting the correct endpoint\r
   *\r
   *  \section Sec_ChangeLog090401 Version 090401\r
   *\r