xref: /haiku/src/add-ons/kernel/drivers/input/usb_hid/Driver.h (revision 268f99dd7dc4bd7474a8bd2742d3f1ec1de6752a)
19e48bf8eSMichael Lotz /*
29e48bf8eSMichael Lotz 	Driver for USB Human Interface Devices.
39e48bf8eSMichael Lotz 	Copyright (C) 2008 Michael Lotz <mmlr@mlotz.ch>
49e48bf8eSMichael Lotz 	Distributed under the terms of the MIT license.
59e48bf8eSMichael Lotz */
69e48bf8eSMichael Lotz #ifndef _USB_HID_DRIVER_H_
79e48bf8eSMichael Lotz #define _USB_HID_DRIVER_H_
89e48bf8eSMichael Lotz 
99e48bf8eSMichael Lotz #include <Drivers.h>
109e48bf8eSMichael Lotz #include <KernelExport.h>
119e48bf8eSMichael Lotz #include <OS.h>
129e48bf8eSMichael Lotz #include <USB3.h>
13e65227c2SMichael Lotz #include <util/kernel_cpp.h>
149e48bf8eSMichael Lotz 
159e48bf8eSMichael Lotz #include "DeviceList.h"
169e48bf8eSMichael Lotz 
179e48bf8eSMichael Lotz #define DRIVER_NAME	"usb_hid"
181e0d4ffaSJérôme Duval #define DEVICE_PATH_SUFFIX	"usb"
19*6a9aea9dSLt-Henry #define DEVICE_NAME	"USB"
209e48bf8eSMichael Lotz 
219e48bf8eSMichael Lotz #define USB_INTERFACE_CLASS_HID			3
229e48bf8eSMichael Lotz #define USB_INTERFACE_SUBCLASS_HID_BOOT	1
239e48bf8eSMichael Lotz #define USB_DEFAULT_CONFIGURATION		0
249e48bf8eSMichael Lotz #define USB_VENDOR_WACOM				0x056a
259e48bf8eSMichael Lotz 
269e48bf8eSMichael Lotz extern usb_module_info *gUSBModule;
279e48bf8eSMichael Lotz extern DeviceList *gDeviceList;
289e48bf8eSMichael Lotz 
299e48bf8eSMichael Lotz extern "C" {
309e48bf8eSMichael Lotz status_t		usb_hid_device_added(usb_device device, void **cookie);
319e48bf8eSMichael Lotz status_t		usb_hid_device_removed(void *cookie);
329e48bf8eSMichael Lotz 
339e48bf8eSMichael Lotz status_t		init_hardware();
349e48bf8eSMichael Lotz void			uninit_driver();
359e48bf8eSMichael Lotz const char **	publish_devices();
369e48bf8eSMichael Lotz device_hooks *	find_device(const char *name);
379e48bf8eSMichael Lotz }
389e48bf8eSMichael Lotz 
399e48bf8eSMichael Lotz #define	TRACE(x...)			/*dprintf(DRIVER_NAME ": " x)*/
409e48bf8eSMichael Lotz #define TRACE_ALWAYS(x...)	dprintf(DRIVER_NAME ": " x)
419e48bf8eSMichael Lotz 
429e48bf8eSMichael Lotz #endif //_USB_HID_DRIVER_H_
43