diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-08-11 08:36:25 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-08-11 08:36:25 +0000 |
commit | a2001ac1ccf4d4919c8243fbc69aff0b68973d3f (patch) | |
tree | 6f71190fd54d08e547634c1d2e8c4cdcd1947c5f /Demos | |
parent | f4814771d2544cc53098fc8c13657eb41e9e9401 (diff) | |
download | lufa-a2001ac1ccf4d4919c8243fbc69aff0b68973d3f.tar.gz lufa-a2001ac1ccf4d4919c8243fbc69aff0b68973d3f.tar.bz2 lufa-a2001ac1ccf4d4919c8243fbc69aff0b68973d3f.zip |
Fixed swapped paremeters in the HID state memory copy call while processing a HID PUSH item in the HID report parser.
Fixed memory corruption HID report parser when too many COLLECTION or PUSH items were processed.
Make RNDIS device class driver include the CDC device class driver header, so that it can inherrit the required CDC functional descriptor macro.
Make HID host class driver include the HID report parser.
Diffstat (limited to 'Demos')
-rw-r--r-- | Demos/Device/ClassDriver/Mouse/Descriptors.h | 4 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h | 18 | ||||
-rw-r--r-- | Demos/Host/ClassDriver/CDCHost/CDCHost.h | 3 | ||||
-rw-r--r-- | Demos/Host/ClassDriver/MouseHost/MouseHost.c | 2 | ||||
-rw-r--r-- | Demos/Host/makefile | 2 |
5 files changed, 7 insertions, 22 deletions
diff --git a/Demos/Device/ClassDriver/Mouse/Descriptors.h b/Demos/Device/ClassDriver/Mouse/Descriptors.h index 0c3434260..8b8158ba8 100644 --- a/Demos/Device/ClassDriver/Mouse/Descriptors.h +++ b/Demos/Device/ClassDriver/Mouse/Descriptors.h @@ -37,11 +37,11 @@ #define _DESCRIPTORS_H_
/* Includes: */
- #include <avr/pgmspace.h>
-
#include <LUFA/Drivers/USB/USB.h>
#include <LUFA/Drivers/USB/Class/HID.h>
+ #include <avr/pgmspace.h>
+
/* Type Defines: */
/** Type define for the device configuration descriptor structure. This must be defined in the
* application code, as the configuration descriptor contains several sub-descriptors which
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h b/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h index 28b801f1a..961a4f461 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h +++ b/Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h @@ -38,25 +38,11 @@ /* Includes: */
#include <LUFA/Drivers/USB/USB.h>
-
+ #include <LUFA/Drivers/USB/Class/RNDIS.h>
+
#include <avr/pgmspace.h>
/* Macros: */
- /** Macro to define a CDC class-specific functional descriptor. CDC functional descriptors have a
- * uniform structure but variable sized data payloads, thus cannot be represented accurately by
- * a single typedef struct. A macro is used instead so that functional descriptors can be created
- * easily by specifying the size of the payload. This allows sizeof() to work correctly.
- *
- * \param[in] DataSize Size in bytes of the CDC functional descriptor's data payload
- */
- #define CDC_FUNCTIONAL_DESCRIPTOR(DataSize) \
- struct \
- { \
- USB_Descriptor_Header_t Header; \
- uint8_t SubType; \
- uint8_t Data[DataSize]; \
- }
-
/** Endpoint number of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPNUM 3
diff --git a/Demos/Host/ClassDriver/CDCHost/CDCHost.h b/Demos/Host/ClassDriver/CDCHost/CDCHost.h index 87a0bbcac..ab31a5793 100644 --- a/Demos/Host/ClassDriver/CDCHost/CDCHost.h +++ b/Demos/Host/ClassDriver/CDCHost/CDCHost.h @@ -47,8 +47,7 @@ #include <LUFA/Drivers/Misc/TerminalCodes.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Board/LEDs.h>
- #include <LUFA/Drivers/USB/USB.h>
- #include <LUFA/Drivers/USB/Class/Host/CDC.h>
+ #include <LUFA/Drivers/USB/USB.h>\
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Demos/Host/ClassDriver/MouseHost/MouseHost.c b/Demos/Host/ClassDriver/MouseHost/MouseHost.c index 65fb4893a..cf2997bcd 100644 --- a/Demos/Host/ClassDriver/MouseHost/MouseHost.c +++ b/Demos/Host/ClassDriver/MouseHost/MouseHost.c @@ -105,7 +105,7 @@ int main(void) USB_HostState = HOST_STATE_Configured;
break;
case HOST_STATE_Configured:
- if (HID_Host_ReportReceived(&Mouse_HID_Interface))
+ if (HID_Host_IsReportReceived(&Mouse_HID_Interface))
{
}
diff --git a/Demos/Host/makefile b/Demos/Host/makefile index 253141330..937c8fac8 100644 --- a/Demos/Host/makefile +++ b/Demos/Host/makefile @@ -14,5 +14,5 @@ # code. %: -# make -C ClassDriver/ $@ <TODO: Re-enable after Host class drivers complete> + make -C ClassDriver/ $@ make -C LowLevel/ $@ |