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 #include "Driver.h" 9 10 class HIDWriter; 11 12 typedef status_t (*quirky_init_function)(usb_device device, 13 const usb_configuration_info *config, size_t interfaceIndex); 14 typedef status_t (*quirky_build_descriptor)(HIDWriter &writer); 15 16 struct usb_hid_quirky_device { 17 uint16 vendor_id; 18 uint16 product_id; 19 20 uint8 device_class; 21 uint8 device_subclass; 22 uint8 device_protocol; 23 24 quirky_init_function init_function; 25 quirky_build_descriptor build_descriptor; 26 }; 27 28 extern usb_hid_quirky_device gQuirkyDevices[]; 29 extern int32 gQuirkyDeviceCount; 30 31 #endif // USB_HID_QUIRKY_DEVICES 32