Fixed RNDISEthenet demo checking the incorrect message field for packet size constrai...
[pub/USBasp.git] / Demos / Host / GenericHIDHost / GenericHIDHost.c
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