xref: /haiku/src/add-ons/kernel/drivers/input/usb_hid/QuirkyDevices.h (revision 560ff4478d5c85455ea3e5ed5e392ef93132d545)
1 /*
2  * Copyright 2011 Michael Lotz <mmlr@mlotz.ch>
3  * Distributed under the terms of the MIT license.
4  */
5 #ifndef USB_HID_QUIRKY_DEVICES
6 #define USB_HID_QUIRKY_DEVICES
7 
8 static uint8 sDescriptorExample[] = { 0x00, 0x00 };
9 
10 struct usb_hid_quirky_device {
11 	uint16			vendor_id;
12 	uint16			product_id;
13 	size_t			descriptor_length;
14 	const uint8 *	fixed_descriptor;
15 };
16 
17 #define ADD_QUIRKY_DEVICE(vendorID, productID, descriptor) \
18 	{ vendorID, productID, sizeof(descriptor), descriptor }
19 
20 static usb_hid_quirky_device sQuirkyDevices[] = {
21 	ADD_QUIRKY_DEVICE(0xffff, 0xffff, sDescriptorExample)
22 };
23 
24 static int32 sQuirkyDeviceCount
25 	= sizeof(sQuirkyDevices) / sizeof(sQuirkyDevices[0]);
26 
27 #endif // USB_HID_QUIRKY_DEVICES
28