xref: /haiku/src/add-ons/kernel/drivers/input/usb_hid/Driver.h (revision a5061ecec55353a5f394759473f1fd6df04890da)
1 /*
2 	Driver for USB Human Interface Devices.
3 	Copyright (C) 2008 Michael Lotz <mmlr@mlotz.ch>
4 	Distributed under the terms of the MIT license.
5 */
6 #ifndef _USB_HID_DRIVER_H_
7 #define _USB_HID_DRIVER_H_
8 
9 #include <Drivers.h>
10 #include <KernelExport.h>
11 #include <OS.h>
12 #include <USB3.h>
13 #include <util/kernel_cpp.h>
14 
15 #include "DeviceList.h"
16 
17 #define DRIVER_NAME	"usb_hid"
18 #define DEVICE_PATH_SUFFIX	"usb"
19 
20 #define USB_INTERFACE_CLASS_HID			3
21 #define USB_INTERFACE_SUBCLASS_HID_BOOT	1
22 #define USB_DEFAULT_CONFIGURATION		0
23 #define USB_VENDOR_WACOM				0x056a
24 
25 extern usb_module_info *gUSBModule;
26 extern DeviceList *gDeviceList;
27 
28 extern "C" {
29 status_t		usb_hid_device_added(usb_device device, void **cookie);
30 status_t		usb_hid_device_removed(void *cookie);
31 
32 status_t		init_hardware();
33 void			uninit_driver();
34 const char **	publish_devices();
35 device_hooks *	find_device(const char *name);
36 }
37 
38 #define	TRACE(x...)			/*dprintf(DRIVER_NAME ": " x)*/
39 #define TRACE_ALWAYS(x...)	dprintf(DRIVER_NAME ": " x)
40 
41 #endif //_USB_HID_DRIVER_H_
42