aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/GenericHIDHost
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-04-13 06:58:46 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-04-13 06:58:46 +0000
commitaf02b5b0c953931ce8b8925439972b1b4bd1d77e (patch)
tree711f70ec11c912f50638beb44e810cf2d8bf86f5 /Demos/Host/GenericHIDHost
parentd3484e6bdd0f92203829770518443045a78ce74b (diff)
downloadlufa-af02b5b0c953931ce8b8925439972b1b4bd1d77e.tar.gz
lufa-af02b5b0c953931ce8b8925439972b1b4bd1d77e.tar.bz2
lufa-af02b5b0c953931ce8b8925439972b1b4bd1d77e.zip
Fixed RNDISEthenet demo checking the incorrect message field for packet size constraints (thanks to Jonathan).
Fixed WriteNextReport code in the GenericHIDHost demo using incorrect parameter types and not selecting the correct endpoint.
Diffstat (limited to 'Demos/Host/GenericHIDHost')
-rw-r--r--Demos/Host/GenericHIDHost/GenericHIDHost.c6
-rw-r--r--Demos/Host/GenericHIDHost/GenericHIDHost.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/Demos/Host/GenericHIDHost/GenericHIDHost.c b/Demos/Host/GenericHIDHost/GenericHIDHost.c
index 778b8f6f8..605fc6f67 100644
--- a/Demos/Host/GenericHIDHost/GenericHIDHost.c
+++ b/Demos/Host/GenericHIDHost/GenericHIDHost.c
@@ -221,10 +221,10 @@ void ReadNextReport(void)
* \param ReportOUTData Buffer containing the report to send to the device
* \param ReportLength Length of the report to send
*/
-void WriteNextReport(uint8_t ReportOUTData, uint16_t ReportLength)
+void WriteNextReport(uint8_t* ReportOUTData, uint16_t ReportLength)
{
/* Select and unfreeze HID data OUT pipe */
- Pipe_SelectPipe(HID_DATA_IN_PIPE);
+ Pipe_SelectPipe(HID_DATA_OUT_PIPE);
/* Not all HID devices have an OUT endpoint (some require OUT reports to be sent over the
* control endpoint instead) - check to see if the OUT endpoint has been initialized */
@@ -242,7 +242,7 @@ void WriteNextReport(uint8_t ReportOUTData, uint16_t ReportLength)
}
/* Read in HID report data */
- Pipe_Write_Stream_LE(&ReportOUTData, ReportLength);
+ Pipe_Write_Stream_LE(ReportOUTData, ReportLength);
/* Clear the OUT endpoint, send last data packet */
Pipe_ClearCurrentBank();
diff --git a/Demos/Host/GenericHIDHost/GenericHIDHost.h b/Demos/Host/GenericHIDHost/GenericHIDHost.h
index f3005e596..d0f3e7ae4 100644
--- a/Demos/Host/GenericHIDHost/GenericHIDHost.h
+++ b/Demos/Host/GenericHIDHost/GenericHIDHost.h
@@ -88,6 +88,6 @@
/* Function Prototypes: */
void UpdateStatus(uint8_t CurrentStatus);
void ReadNextReport(void);
- void WriteNextReport(uint8_t ReportOUTData, uint16_t ReportLength);
+ void WriteNextReport(uint8_t* ReportOUTData, uint16_t ReportLength);
#endif