Vendor type requests sent to custom HID class template
Posted: Mon Apr 20, 2009 11:43 pm
hi everyone,
after reading:
http://vusb.wikidot.com/usb-device-classes
i came to the conclusion that my project would benefit from using the following USB Device Class:
Vendor type requests sent to custom HID class device
i am looking for a template / project that use this method!
here's what i have discovered so far:
usbconfig.h
usbHidReportDescriptor
it's working perfectly on Linux & Mac, but on Windows i still need to install libusb-win32. The device is not found if i don't install it. However, on V-USB wiki there's this line:
i am not sure what files or folders and where i need to copy them?
thank you very much,
patrick
after reading:
http://vusb.wikidot.com/usb-device-classes
i came to the conclusion that my project would benefit from using the following USB Device Class:
Vendor type requests sent to custom HID class device
i am looking for a template / project that use this method!
here's what i have discovered so far:
usbconfig.h
Code: Select all
#define USB_CFG_HAVE_INTRIN_ENDPOINT 1
#define USB_CFG_HAVE_INTRIN_ENDPOINT3 0
#define USB_CFG_EP3_NUMBER 3
#define USB_CFG_DEVICE_CLASS 0
#define USB_CFG_DEVICE_SUBCLASS 0
#define USB_CFG_INTERFACE_CLASS 0x03
#define USB_CFG_INTERFACE_SUBCLASS 0
#define USB_CFG_INTERFACE_PROTOCOL 0
#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 33
usbHidReportDescriptor
Code: Select all
PROGMEM char usbHidReportDescriptor[33] = {
0x06, 0x00, 0xff, // USAGE_PAGE (Generic Desktop)
0x09, 0x01, // USAGE (Vendor Usage 1)
0xa1, 0x01, // COLLECTION (Application)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (255)
0x75, 0x08, // REPORT_SIZE (8)
0x85, 0x01, // REPORT_ID (1)
0x95, 0x06, // REPORT_COUNT (6)
0x09, 0x00, // USAGE (Undefined)
0xb2, 0x02, 0x01, // FEATURE (Data,Var,Abs,Buf)
0x85, 0x02, // REPORT_ID (2)
0x95, 0x83, // REPORT_COUNT (131)
0x09, 0x00, // USAGE (Undefined)
0xb2, 0x02, 0x01, // FEATURE (Data,Var,Abs,Buf)
0xc0 // END_COLLECTION
};
it's working perfectly on Linux & Mac, but on Windows i still need to install libusb-win32. The device is not found if i don't install it. However, on V-USB wiki there's this line:
On Windows, you still must ship libusb-win32 with your code. However, it's sufficient to have it in the same directory as your application.
i am not sure what files or folders and where i need to copy them?
thank you very much,
patrick