Fix Joystick device demo HID descriptors - buttons should be placed outside the Pointer collection.
0x75, 0x08, /* Report Size (8) */\r
0x95, 0x02, /* Report Count (2) */\r
0x81, 0x82, /* Input (Data, Variable, Absolute, Volatile) */\r
- 0x05, 0x09, /* Usage Page (Button) */\r
- 0x09, 0x02, /* Usage (Button 2) */\r
- 0x09, 0x01, /* Usage (Button 1) */\r
- 0x15, 0x00, /* Logical Minimum (0) */\r
- 0x25, 0x01, /* Logical Maximum (1) */\r
- 0x75, 0x01, /* Report Size (1) */\r
- 0x95, 0x02, /* Report Count (2) */\r
- 0x81, 0x02, /* Input (Data, Variable, Absolute) */\r
- 0x75, 0x06, /* Report Size (6) */\r
- 0x95, 0x01, /* Report Count (1) */\r
- 0x81, 0x01, /* Input (Constant) */\r
0xc0, /* End Collection */\r
+ 0x05, 0x09, /* Usage Page (Button) */\r
+ 0x09, 0x02, /* Usage (Button 2) */\r
+ 0x09, 0x01, /* Usage (Button 1) */\r
+ 0x15, 0x00, /* Logical Minimum (0) */\r
+ 0x25, 0x01, /* Logical Maximum (1) */\r
+ 0x75, 0x01, /* Report Size (1) */\r
+ 0x95, 0x02, /* Report Count (2) */\r
+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */\r
+ 0x75, 0x06, /* Report Size (6) */\r
+ 0x95, 0x01, /* Report Count (1) */\r
+ 0x81, 0x01, /* Input (Constant) */\r
0xc0 /* End Collection */\r
};\r
\r
0x75, 0x08, /* Report Size (8) */\r
0x95, 0x02, /* Report Count (2) */\r
0x81, 0x82, /* Input (Data, Variable, Absolute, Volatile) */\r
- 0x05, 0x09, /* Usage Page (Button) */\r
- 0x09, 0x02, /* Usage (Button 2) */\r
- 0x09, 0x01, /* Usage (Button 1) */\r
- 0x15, 0x00, /* Logical Minimum (0) */\r
- 0x25, 0x01, /* Logical Maximum (1) */\r
- 0x75, 0x01, /* Report Size (1) */\r
- 0x95, 0x02, /* Report Count (2) */\r
- 0x81, 0x02, /* Input (Data, Variable, Absolute) */\r
- 0x75, 0x06, /* Report Size (6) */\r
- 0x95, 0x01, /* Report Count (1) */\r
- 0x81, 0x01, /* Input (Constant) */\r
0xc0, /* End Collection */\r
+ 0x05, 0x09, /* Usage Page (Button) */\r
+ 0x09, 0x02, /* Usage (Button 2) */\r
+ 0x09, 0x01, /* Usage (Button 1) */\r
+ 0x15, 0x00, /* Logical Minimum (0) */\r
+ 0x25, 0x01, /* Logical Maximum (1) */\r
+ 0x75, 0x01, /* Report Size (1) */\r
+ 0x95, 0x02, /* Report Count (2) */\r
+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */\r
+ 0x75, 0x06, /* Report Size (6) */\r
+ 0x95, 0x01, /* Report Count (1) */\r
+ 0x81, 0x01, /* Input (Constant) */\r
0xc0 /* End Collection */\r
};\r
\r
\r
Endpoint_ClearSETUP();\r
\r
- Endpoint_ClearIN();\r
+ Endpoint_ClearStatusStage();\r
\r
while (!(Endpoint_IsINReady()))\r
{\r
\r
USB_ConfigurationNumber = (uint8_t)USB_ControlRequest.wValue;\r
\r
- Endpoint_ClearIN();\r
+ Endpoint_ClearStatusStage();\r
\r
if (USB_ConfigurationNumber)\r
USB_DeviceState = DEVICE_STATE_Configured;\r
Endpoint_ClearSETUP();\r
\r
Endpoint_Write_Byte(USB_ConfigurationNumber);\r
- \r
Endpoint_ClearIN();\r
\r
- while (!(Endpoint_IsOUTReceived()))\r
- {\r
- if (USB_DeviceState == DEVICE_STATE_Unattached)\r
- return; \r
- }\r
-\r
- Endpoint_ClearOUT();\r
+ Endpoint_ClearStatusStage();\r
}\r
\r
#if !defined(NO_INTERNAL_SERIAL) && (defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))\r
}\r
\r
Endpoint_ClearSETUP();\r
+\r
Endpoint_Write_Control_Stream_LE(&SignatureDescriptor, sizeof(SignatureDescriptor));\r
+\r
Endpoint_ClearOUT();\r
}\r
#endif\r
Endpoint_ClearSETUP();\r
\r
Endpoint_Write_Word_LE(CurrentStatus);\r
-\r
Endpoint_ClearIN();\r
\r
- while (!(Endpoint_IsOUTReceived()))\r
- {\r
- if (USB_DeviceState == DEVICE_STATE_Unattached)\r
- return; \r
- }\r
- \r
- Endpoint_ClearOUT();\r
+ Endpoint_ClearStatusStage();\r
}\r
\r
static void USB_Device_ClearSetFeature(void)\r
\r
Endpoint_ClearSETUP();\r
\r
- Endpoint_ClearIN();\r
+ Endpoint_ClearStatusStage();\r
}\r
\r
#endif\r
* Report protocol is not needed\r
* - Added new MIDI LowLevel and ClassDriver Host demo, add new MIDI Host Class driver\r
* - Added stdio.h stream examples for the virtual CDC UART in the CDC host demos\r
+ * - Added new CDC/Mouse ClassDriver device demo\r
*\r
* <b>Changed:</b>\r
* - Removed mostly useless "TestApp" demo, as it was mainly useful only for checking for sytax errors in the library\r
* - Fixed incorrect SampleFrequencyType value in the AudioInput and AudioOutput ClassDriver demos' descriptors\r
* - Fixed incorrect event name rule in demo/project/bootloader makefiles\r
* - Fixed HID device class driver not reselecting the correct endpoint once the user callback routines have been called\r
+ * - Corrected HID descriptor in the Joystick Device demos - buttons should be placed outside the pointer collection\r
*\r
* \section Sec_ChangeLog090924 Version 090924\r
*\r
* - "Fingerlicking Wingdinger" (WARNING: Bad Language if no Javascript), a MIDI controller - http://noisybox.net/electronics/wingdinger/\r
* - Garmin GPS USB to NMEA standard serial sentence translator: http://github.com/nall/garmin-transmogrifier/tree/master\r
* - Generic HID Device Creator : http://generichid.sourceforge.net/\r
+ * - Mobo 4.3, some sort of Audio related device: http://sites.google.com/site/lofturj/mobo4_3\r
* - NES Controller USB modification: http://projects.peterpolidoro.net/video/NESUSB.htm\r
* - MakeTV Episode Dispenser: http://www.youtube.com/watch?v=BkWUi18hl3g\r
* - Opendous-JTAG, an open source JTAG device: http://code.google.com/p/opendous-jtag/\r