Index: uspace/lib/usbhid/include/usb/classes/hid.h
===================================================================
--- uspace/lib/usbhid/include/usb/classes/hid.h	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ 	(revision )
@@ -1,75 +1,0 @@
-/*
- * Copyright (c) 2010 Vojtech Horky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libusb
- * @{
- */
-/** @file
- * @brief USB HID device related types.
- */
-#ifndef LIBUSB_HID_H_
-#define LIBUSB_HID_H_
-
-#include <usb/usb.h>
-#include <usb/classes/hidparser.h>
-#include <usb/descriptor.h>
-
-/** USB/HID device requests. */
-typedef enum {
-	USB_HIDREQ_GET_REPORT = 1,
-	USB_HIDREQ_GET_IDLE = 2,
-	USB_HIDREQ_GET_PROTOCOL = 3,
-	/* Values 4 to 8 are reserved. */
-	USB_HIDREQ_SET_REPORT = 9,
-	USB_HIDREQ_SET_IDLE = 10,
-	USB_HIDREQ_SET_PROTOCOL = 11
-} usb_hid_request_t;
-
-typedef enum {
-	USB_HID_PROTOCOL_BOOT = 0,
-	USB_HID_PROTOCOL_REPORT = 1
-} usb_hid_protocol_t;
-
-/** USB/HID subclass constants. */
-typedef enum {
-	USB_HID_SUBCLASS_NONE = 0,
-	USB_HID_SUBCLASS_BOOT = 1
-} usb_hid_subclass_t;
-
-/** USB/HID interface protocols. */
-typedef enum {
-	USB_HID_PROTOCOL_NONE = 0,
-	USB_HID_PROTOCOL_KEYBOARD = 1,
-	USB_HID_PROTOCOL_MOUSE = 2
-} usb_hid_iface_protocol_t;
-
-
-#endif
-/**
- * @}
- */
Index: uspace/lib/usbhid/include/usb/classes/hid/iface.h
===================================================================
--- uspace/lib/usbhid/include/usb/classes/hid/iface.h	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- * Copyright (c) 2011 Vojtech Horky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libusb
- * @{
- */
-/** @file
- * Client functions for accessing USB HID interface.
- */
-#ifndef LIBUSB_CLASSES_HID_IFACE_H_
-#define LIBUSB_CLASSES_HID_IFACE_H_
-
-#include <sys/types.h>
-
-int usbhid_dev_get_event_length(int);
-int usbhid_dev_get_event(int, uint16_t *, uint16_t *, size_t, size_t *,
-    unsigned int);
-
-#endif
-/**
- * @}
- */
Index: uspace/lib/usbhid/include/usb/classes/hid/utled.h
===================================================================
--- uspace/lib/usbhid/include/usb/classes/hid/utled.h	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ 	(revision )
@@ -1,122 +1,0 @@
-/*
- * Copyright (c) 2010 Lubos Slovak
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libusb
- * @{
- */
-/** @file
- * @brief USB HID Usage Tables - LED page.
- */
-#ifndef LIBUSB_UTLED_H_
-#define LIBUSB_UTLED_H_
-
-typedef enum {
-	USB_HID_LED_UNDEFINED = 0,
-	USB_HID_LED_NUM_LOCK,
-	USB_HID_LED_CAPS_LOCK,
-	USB_HID_LED_SCROLL_LOCK,
-	USB_HID_LED_COMPOSE,
-	USB_HID_LED_KANA,
-	USB_HID_LED_POWER,
-	USB_HID_LED_SHIFT,
-	USB_HID_LED_DND,
-	USB_HID_LED_MUTE,
-	USB_HID_LED_TONE_ENABLE,
-	USB_HID_LED_HIGH_CUT_FILTER,
-	USB_HID_LED_LOW_CUT_FILTER,
-	USB_HID_LED_EQ_ENABLE,
-	USB_HID_LED_SOUND_FIELD_ON,
-	USB_HID_LED_SURROUND_ON,
-	USB_HID_LED_REPEAT,
-	USB_HID_LED_STEREO,
-	USB_HID_LED_SAMPLING_RATE_DETECT,
-	USB_HID_LED_SPINNING,
-	USB_HID_LED_CAV,
-	USB_HID_LED_CLV,
-	USB_HID_LED_RECORDING_FORMAT_DETECT,
-	USB_HID_LED_OFF_HOOK,
-	USB_HID_LED_RING,
-	USB_HID_LED_MESSAGE_WAITING,
-	USB_HID_LED_DATA_MODE,
-	USB_HID_LED_BATTERY_OPERATION,
-	USB_HID_LED_BATTERY_OK,
-	USB_HID_LED_BATTERY_LOW,
-	USB_HID_LED_SPEAKER,
-	USB_HID_LED_HEAD_SET,
-	USB_HID_LED_HOLD,
-	USB_HID_LED_MICRO,
-	USB_HID_LED_COVERAGE,
-	USB_HID_LED_NIGHT_MODE,
-	USB_HID_LED_SEND_CALLS,
-	USB_HID_LED_CALL_PICKUP,
-	USB_HID_LED_CONFERENCE,
-	USB_HID_LED_STAND_BY,
-	USB_HID_LED_CAMERA_ON,
-	USB_HID_LED_CAMERA_OFF,
-	USB_HID_LED_ON_LINE,
-	USB_HID_LED_OFF_LINE,
-	USB_HID_LED_BUSY,
-	USB_HID_LED_READY,
-	USB_HID_LED_PAPER_OUT,
-	USB_HID_LED_PAPER_JAM,
-	USB_HID_LED_REMOTE,
-	USB_HID_LED_FORWARD,
-	USB_HID_LED_REVERSE,
-	USB_HID_LED_STOP,
-	USB_HID_LED_REWIND,
-	USB_HID_LED_FAST_FORWARD,
-	USB_HID_LED_PLAY,
-	USB_HID_LED_PAUSE,
-	USB_HID_LED_RECORD,
-	USB_HID_LED_ERROR,
-	USB_HID_LED_USAGE_SELECTED_IND,
-	USB_HID_LED_USAGE_IN_USE_IND,
-	USB_HID_LED_USAGE_MULTI_MODE_IND,
-	USB_HID_LED_IND_ON,
-	USB_HID_LED_IND_FLASH,
-	USB_HID_LED_IND_SLOW_BLINK,
-	USB_HID_LED_IND_FAST_BLINK,
-	USB_HID_LED_IND_OFF,
-	USB_HID_LED_FLASH_ON_TIME,
-	USB_HID_LED_SLOW_BLINK_ON_TIME,
-	USB_HID_LED_SLOW_BLINK_OFF_TIME,
-	USB_HID_LED_FAST_BLINK_ON_TIME,
-	USB_HID_LED_FAST_BLINK_OFF_TIME,
-	USB_HID_LED_USAGE_IND_COLOR,
-	USB_HID_LED_IND_RED,
-	USB_HID_LED_IND_GREEN,
-	USB_HID_LED_IND_AMBER,
-	USB_HID_LED_GENERIC_IND,
-	USB_HID_LED_SYSTEM_SUSPEND,
-	USB_HID_LED_EXTERNAL_POWER
-} usb_hid_usage_led_t;
-
-#endif /* LIBUSB_UTLED_H_ */
-/**
- * @}
- */
Index: uspace/lib/usbhid/include/usb/classes/hid_report_items.h
===================================================================
--- uspace/lib/usbhid/include/usb/classes/hid_report_items.h	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ 	(revision )
@@ -1,106 +1,0 @@
-/*
- * Copyright (c) 2011 Matej Klonfar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libusb
- * @{
- */
-/** @file
- * @brief USB HID parser.
- */
-#ifndef LIBUSB_HID_REPORT_ITEMS_H_
-#define LIBUSB_HID_REPORT_ITEMS_H_
-
-#include <stdint.h>
-
-/**
- * Item prefix
- */
-#define USB_HID_ITEM_SIZE(data) 	((uint8_t)(data & 0x3))
-#define USB_HID_ITEM_TAG(data) 		((uint8_t)((data & 0xF0) >> 4))
-#define USB_HID_ITEM_TAG_CLASS(data)	((uint8_t)((data & 0xC) >> 2))
-#define USB_HID_ITEM_IS_LONG(data)	(data == 0xFE)
-
-
-/**
- * Input/Output/Feature Item flags
- */
-/** Constant (1) / Variable (0) */
-#define USB_HID_ITEM_FLAG_CONSTANT(flags) 	((flags & 0x1) == 0x1)
-/** Variable (1) / Array (0) */
-#define USB_HID_ITEM_FLAG_VARIABLE(flags) 	((flags & 0x2) == 0x2)
-/** Absolute / Relative*/
-#define USB_HID_ITEM_FLAG_RELATIVE(flags) 	((flags & 0x4) == 0x4)
-/** Wrap / No Wrap */
-#define USB_HID_ITEM_FLAG_WRAP(flags)		((flags & 0x8) == 0x8)
-#define USB_HID_ITEM_FLAG_LINEAR(flags)		((flags & 0x10) == 0x10)
-#define USB_HID_ITEM_FLAG_PREFERRED(flags)	((flags & 0x20) == 0x20)
-#define USB_HID_ITEM_FLAG_POSITION(flags)	((flags & 0x40) == 0x40)
-#define USB_HID_ITEM_FLAG_VOLATILE(flags)	((flags & 0x80) == 0x80)
-#define USB_HID_ITEM_FLAG_BUFFERED(flags)	((flags & 0x100) == 0x100)
-
-/* MAIN ITEMS */
-#define USB_HID_TAG_CLASS_MAIN				0x0
-#define USB_HID_REPORT_TAG_INPUT			0x8
-#define USB_HID_REPORT_TAG_OUTPUT			0x9
-#define USB_HID_REPORT_TAG_FEATURE			0xB
-#define USB_HID_REPORT_TAG_COLLECTION		0xA
-#define USB_HID_REPORT_TAG_END_COLLECTION	0xC
-
-/* GLOBAL ITEMS */
-#define USB_HID_TAG_CLASS_GLOBAL			0x1
-#define USB_HID_REPORT_TAG_USAGE_PAGE		0x0
-#define USB_HID_REPORT_TAG_LOGICAL_MINIMUM	0x1
-#define USB_HID_REPORT_TAG_LOGICAL_MAXIMUM	0x2
-#define USB_HID_REPORT_TAG_PHYSICAL_MINIMUM 0x3
-#define USB_HID_REPORT_TAG_PHYSICAL_MAXIMUM 0x4
-#define USB_HID_REPORT_TAG_UNIT_EXPONENT	0x5
-#define USB_HID_REPORT_TAG_UNIT				0x6
-#define USB_HID_REPORT_TAG_REPORT_SIZE		0x7
-#define USB_HID_REPORT_TAG_REPORT_ID		0x8
-#define USB_HID_REPORT_TAG_REPORT_COUNT		0x9
-#define USB_HID_REPORT_TAG_PUSH				0xA
-#define USB_HID_REPORT_TAG_POP				0xB
-
-
-/* LOCAL ITEMS */
-#define USB_HID_TAG_CLASS_LOCAL					0x2
-#define USB_HID_REPORT_TAG_USAGE				0x0
-#define USB_HID_REPORT_TAG_USAGE_MINIMUM		0x1
-#define USB_HID_REPORT_TAG_USAGE_MAXIMUM		0x2
-#define USB_HID_REPORT_TAG_DESIGNATOR_INDEX		0x3
-#define USB_HID_REPORT_TAG_DESIGNATOR_MINIMUM	0x4
-#define USB_HID_REPORT_TAG_DESIGNATOR_MAXIMUM	0x5
-#define USB_HID_REPORT_TAG_STRING_INDEX			0x7
-#define USB_HID_REPORT_TAG_STRING_MINIMUM		0x8
-#define USB_HID_REPORT_TAG_STRING_MAXIMUM		0x9
-#define USB_HID_REPORT_TAG_DELIMITER			0xA
-
-#endif
-/**
- * @}
- */
Index: uspace/lib/usbhid/include/usb/classes/hiddescriptor.h
===================================================================
--- uspace/lib/usbhid/include/usb/classes/hiddescriptor.h	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ 	(revision )
@@ -1,84 +1,0 @@
-/*
- * Copyright (c) 2011 Matej Klonfar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libusb
- * @{
- */
-/** @file
- * USB HID report descriptor and report data parser
- */
-#ifndef LIBUSB_HIDDESCRIPTOR_H_
-#define LIBUSB_HIDDESCRIPTOR_H_
-
-#include <stdint.h>
-#include <adt/list.h>
-#include <usb/classes/hid_report_items.h>
-#include <usb/classes/hidpath.h>
-#include <usb/classes/hidtypes.h>
-
-
-/*
- * Descriptor parser functions
- */
-
-/** */
-int usb_hid_parse_report_descriptor(usb_hid_report_t *report, 
-                                    const uint8_t *data, size_t size);
-
-/** */
-void usb_hid_free_report(usb_hid_report_t *report);
-
-/** */
-void usb_hid_descriptor_print(usb_hid_report_t *report);
-
-
-int usb_hid_report_init(usb_hid_report_t *report);
-int usb_hid_report_append_fields(usb_hid_report_t *report, 
-                                 usb_hid_report_item_t *report_item);
-
-usb_hid_report_description_t * usb_hid_report_find_description(const usb_hid_report_t *report, uint8_t report_id, usb_hid_report_type_t type);
-int usb_hid_report_parse_tag(uint8_t tag, uint8_t class, const uint8_t *data, size_t item_size,
-                             usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path);
-int usb_hid_report_parse_main_tag(uint8_t tag, const uint8_t *data, size_t item_size,
-                             usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path);
-int usb_hid_report_parse_global_tag(uint8_t tag, const uint8_t *data, size_t item_size,
-                             usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path);
-int usb_hid_report_parse_local_tag(uint8_t tag, const uint8_t *data, size_t item_size,
-                             usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path);
-
-void usb_hid_descriptor_print_list(link_t *head);
-void usb_hid_report_reset_local_items(usb_hid_report_item_t *report_item);
-void usb_hid_free_report_list(link_t *head);
-usb_hid_report_item_t *usb_hid_report_item_clone(const usb_hid_report_item_t *item);
-uint32_t usb_hid_report_tag_data_uint32(const uint8_t *data, size_t size);
-
-usb_hid_report_path_t *usb_hid_report_path_try_insert(usb_hid_report_t *report, usb_hid_report_path_t *cmp_path);
-#endif
-/**
- * @}
- */
Index: uspace/lib/usbhid/include/usb/classes/hidparser.h
===================================================================
--- uspace/lib/usbhid/include/usb/classes/hidparser.h	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ 	(revision )
@@ -1,90 +1,0 @@
-/*
- * Copyright (c) 2011 Matej Klonfar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libusb
- * @{
- */
-/** @file
- * USB HID report descriptor and report data parser
- */
-#ifndef LIBUSB_HIDPARSER_H_
-#define LIBUSB_HIDPARSER_H_
-
-#include <stdint.h>
-#include <adt/list.h>
-#include <usb/classes/hid_report_items.h>
-#include <usb/classes/hidpath.h>
-#include <usb/classes/hidtypes.h>
-#include <usb/classes/hiddescriptor.h>
-
-
-/*
- * Input report parser functions
- */
-/** */
-int usb_hid_parse_report(const usb_hid_report_t *report, const uint8_t *data, 
-                         size_t size, uint8_t *report_id);
-
-/** */
-size_t usb_hid_report_input_length(const usb_hid_report_t *report,
-	usb_hid_report_path_t *path, int flags);
-
-/*
- * Output report parser functions
- */
-/** Allocates output report buffer*/
-uint8_t *usb_hid_report_output(usb_hid_report_t *report, size_t *size, 
-                               uint8_t report_id);
-
-/** Frees output report buffer*/
-void usb_hid_report_output_free(uint8_t *output);
-
-/** Returns size of output for given usage path */
-size_t usb_hid_report_output_size(usb_hid_report_t *report,
-                                  usb_hid_report_path_t *path, int flags);
-
-/** Makes the output report buffer by translated given data */
-int usb_hid_report_output_translate(usb_hid_report_t *report, uint8_t report_id, 
-                                    uint8_t *buffer, size_t size);
-
-/** */
-usb_hid_report_field_t *usb_hid_report_get_sibling(usb_hid_report_t *report, 
-                                                   usb_hid_report_field_t *field, 
-                                                   usb_hid_report_path_t *path, 
-                                                   int flags, 
-                                                   usb_hid_report_type_t type);
-
-/** */
-uint8_t usb_hid_report_get_report_id(usb_hid_report_t *report, 
-                                     uint8_t report_id, 
-                                     usb_hid_report_type_t type);
-
-#endif
-/**
- * @}
- */
Index: uspace/lib/usbhid/include/usb/classes/hidpath.h
===================================================================
--- uspace/lib/usbhid/include/usb/classes/hidpath.h	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ 	(revision )
@@ -1,118 +1,0 @@
-/*
- * Copyright (c) 2011 Matej Klonfar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libusb
- * @{
- */
-/** @file
- * USB HID report descriptor and report data parser
- */
-#ifndef LIBUSB_HIDPATH_H_
-#define LIBUSB_HIDPATH_H_
-
-#include <usb/classes/hidparser.h>
-#include <stdint.h>
-#include <adt/list.h>
-
-/**
- * Description of path of usage pages and usages in report descriptor
- */
-/** Wanted usage path must be exactly the same as the searched one */
-#define USB_HID_PATH_COMPARE_STRICT		0
-/** Wanted usage path must be the suffix in the searched one */
-#define USB_HID_PATH_COMPARE_END		1
-/** */
-#define USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY	2
-/** Searched usage page must be prefix of the other one */
-#define USB_HID_PATH_COMPARE_BEGIN		4
-/** Searched couple of usage page and usage can be anywhere in usage path */
-#define USB_HID_PATH_COMPARE_ANYWHERE		8
-
-
-/** Collection usage path structure */
-typedef struct {
-	/** */
-	uint32_t usage_page;
-	/** */	
-	uint32_t usage;
-
-	uint8_t flags;
-	/** */
-	link_t link;
-} usb_hid_report_usage_path_t;
-
-/** */
-typedef struct {
-	/** */	
-	int depth;	
-	uint8_t report_id;
-	
-	/** */	
-	link_t link; /* list */
-
-	link_t head; /* head of list of usage paths */
-
-} usb_hid_report_path_t;
-
-/** */
-usb_hid_report_path_t *usb_hid_report_path(void);
-
-/** */
-void usb_hid_report_path_free(usb_hid_report_path_t *path);
-
-/** */
-int usb_hid_report_path_set_report_id(usb_hid_report_path_t *usage_path, 
-                                      uint8_t report_id);
-
-/** */
-int usb_hid_report_path_append_item(usb_hid_report_path_t *usage_path, 
-                                    int32_t usage_page, int32_t usage);
-
-/** */
-void usb_hid_report_remove_last_item(usb_hid_report_path_t *usage_path);
-
-/** */
-void usb_hid_report_null_last_item(usb_hid_report_path_t *usage_path);
-
-/** */
-void usb_hid_report_set_last_item(usb_hid_report_path_t *usage_path, 
-                                  int32_t tag, int32_t data);
-
-/** */
-int usb_hid_report_compare_usage_path(usb_hid_report_path_t *report_path, 
-                                      usb_hid_report_path_t *path, int flags);
-
-/** */
-usb_hid_report_path_t *usb_hid_report_path_clone(usb_hid_report_path_t *usage_path);
-
-void usb_hid_print_usage_path(usb_hid_report_path_t *path);
-
-#endif
-/**
- * @}
- */
Index: uspace/lib/usbhid/include/usb/classes/hidreport.h
===================================================================
--- uspace/lib/usbhid/include/usb/classes/hidreport.h	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/*
- * Copyright (c) 2011 Lubos Slovak
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libusb
- * @{
- */
-/** @file
- * USB HID report parser initialization from descriptors.
- */
-
-#ifndef LIBUSB_HIDREPORT_H_
-#define LIBUSB_HIDREPORT_H_
-
-#include <usb/dev/driver.h>
-#include <usb/classes/hidparser.h>
-
-/**
- * Retrieves the Report descriptor from the USB device and initializes the
- * report parser.
- *
- * \param dev USB device representing a HID device.
- * \param parser HID Report parser.
- *
- * \retval EOK if successful.
- * \retval EINVAL if one of the parameters is not given (is NULL).
- * \retval ENOENT if there are some descriptors missing.
- * \retval ENOMEM if an error with allocation occured.
- * \retval EINVAL if the Report descriptor's size does not match the size 
- *         from the interface descriptor.
- * \return Other value inherited from function usb_pipe_start_session(),
- *         usb_pipe_end_session() or usb_request_get_descriptor().
- */
-int usb_hid_process_report_descriptor(usb_device_t *dev, 
-    usb_hid_report_t *report);
-
-#endif /* LIBUSB_HIDREPORT_H_ */
-
-/**
- * @}
- */
Index: uspace/lib/usbhid/include/usb/classes/hidreq.h
===================================================================
--- uspace/lib/usbhid/include/usb/classes/hidreq.h	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*
- * Copyright (c) 2011 Lubos Slovak
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libusb
- * @{
- */
-/** @file
- * HID class-specific requests.
- */
-
-#ifndef USB_KBD_HIDREQ_H_
-#define USB_KBD_HIDREQ_H_
-
-#include <stdint.h>
-
-#include <usb/classes/hid.h>
-#include <usb/dev/pipes.h>
-
-/*----------------------------------------------------------------------------*/
-
-int usbhid_req_set_report(usb_pipe_t *ctrl_pipe, int iface_no,
-    usb_hid_report_type_t type, uint8_t *buffer, size_t buf_size);
-
-int usbhid_req_set_protocol(usb_pipe_t *ctrl_pipe, int iface_no, 
-    usb_hid_protocol_t protocol);
-
-int usbhid_req_set_idle(usb_pipe_t *ctrl_pipe, int iface_no, uint8_t duration);
-
-int usbhid_req_get_report(usb_pipe_t *ctrl_pipe, int iface_no, 
-    usb_hid_report_type_t type, uint8_t *buffer, size_t buf_size, 
-    size_t *actual_size);
-
-int usbhid_req_get_protocol(usb_pipe_t *ctrl_pipe, int iface_no, 
-    usb_hid_protocol_t *protocol);
-
-int usbhid_req_get_idle(usb_pipe_t *ctrl_pipe, int iface_no, uint8_t *duration);
-
-/*----------------------------------------------------------------------------*/
-
-#endif /* USB_KBD_HIDREQ_H_ */
-
-/**
- * @}
- */
Index: uspace/lib/usbhid/include/usb/classes/hidtypes.h
===================================================================
--- uspace/lib/usbhid/include/usb/classes/hidtypes.h	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ 	(revision )
@@ -1,210 +1,0 @@
-/*
- * Copyright (c) 2011 Matej Klonfar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libusb
- * @{
- */
-/** @file
- * USB HID report descriptor and report data parser
- */
-#ifndef LIBUSB_HIDTYPES_H_
-#define LIBUSB_HIDTYPES_H_
-
-#include <stdint.h>
-#include <adt/list.h>
-
-#define USB_HID_MAX_USAGES	20
-
-#define USB_HID_UINT32_TO_INT32(x, size)	((((x) & (1 << ((size) - 1))) != 0) ? -(~(x - 1) & ((1 << size) - 1)) : (x)) //(-(~((x) - 1)))
-#define USB_HID_INT32_TO_UINT32(x, size)	(((x) < 0 ) ? ((1 << (size)) + (x)) : (x))
-
-
-typedef enum {
-	USB_HID_REPORT_TYPE_INPUT = 1,
-	USB_HID_REPORT_TYPE_OUTPUT = 2,
-	USB_HID_REPORT_TYPE_FEATURE = 3
-} usb_hid_report_type_t;
-
-
-typedef struct {
-	/** */
-	int report_count;
-	link_t reports;		/** list of usb_hid_report_description_t */
-
-	link_t collection_paths;
-	int collection_paths_count;
-
-	int use_report_ids;
-	uint8_t last_report_id;
-	
-} usb_hid_report_t;
-
-typedef struct {
-	uint8_t report_id;
-	usb_hid_report_type_t type;
-
-	size_t bit_length;
-	size_t item_length;
-	
-	link_t report_items;	/** list of report items (fields) */
-
-	link_t link;
-} usb_hid_report_description_t;
-
-typedef struct {
-
-	int offset;
-	size_t size;
-
-	uint16_t usage_page;
-	uint16_t usage;
-
-	uint8_t item_flags;
-	usb_hid_report_path_t *collection_path;
-
-	int32_t logical_minimum;
-	int32_t logical_maximum;
-	int32_t physical_minimum;
-	int32_t physical_maximum;
-	uint32_t usage_minimum;
-	uint32_t usage_maximum;
-	uint32_t unit;
-	uint32_t unit_exponent;
-	
-
-	int32_t value;
-
-	link_t link;
-} usb_hid_report_field_t;
-
-
-
-/**
- * state table
- */
-typedef struct {
-	/** report id */	
-	int32_t id;
-	
-	/** */
-	uint16_t extended_usage_page;
-	uint32_t usages[USB_HID_MAX_USAGES];
-	int usages_count;
-
-	/** */
-	uint32_t usage_page;
-
-	/** */	
-	uint32_t usage_minimum;
-	/** */	
-	uint32_t usage_maximum;
-	/** */	
-	int32_t logical_minimum;
-	/** */	
-	int32_t logical_maximum;
-	/** */	
-	int32_t size;
-	/** */	
-	int32_t count;
-	/** */	
-	size_t offset;
-	/** */	
-	int32_t unit_exponent;
-	/** */	
-	int32_t unit;
-
-	/** */
-	uint32_t string_index;
-	/** */	
-	uint32_t string_minimum;
-	/** */	
-	uint32_t string_maximum;
-	/** */	
-	uint32_t designator_index;
-	/** */	
-	uint32_t designator_minimum;
-	/** */	
-	uint32_t designator_maximum;
-	/** */	
-	int32_t physical_minimum;
-	/** */	
-	int32_t physical_maximum;
-
-	/** */	
-	uint8_t item_flags;
-
-	usb_hid_report_type_t type;
-
-	/** current collection path*/	
-	usb_hid_report_path_t *usage_path;
-	/** */	
-	link_t link;
-
-	int in_delimiter;
-} usb_hid_report_item_t;
-
-/** HID parser callbacks for IN items. */
-typedef struct {
-	/** Callback for keyboard.
-	 *
-	 * @param key_codes Array of pressed key (including modifiers).
-	 * @param count Length of @p key_codes.
-	 * @param arg Custom argument.
-	 */
-	void (*keyboard)(const uint8_t *key_codes, size_t count, const uint8_t report_id, void *arg);
-} usb_hid_report_in_callbacks_t;
-
-
-typedef enum {
-	USB_HID_MOD_LCTRL = 0x01,
-	USB_HID_MOD_LSHIFT = 0x02,
-	USB_HID_MOD_LALT = 0x04,
-	USB_HID_MOD_LGUI = 0x08,
-	USB_HID_MOD_RCTRL = 0x10,
-	USB_HID_MOD_RSHIFT = 0x20,
-	USB_HID_MOD_RALT = 0x40,
-	USB_HID_MOD_RGUI = 0x80,
-	USB_HID_MOD_COUNT = 8
-} usb_hid_modifiers_t;
-
-static const usb_hid_modifiers_t 
-    usb_hid_modifiers_consts[USB_HID_MOD_COUNT] = {
-	USB_HID_MOD_LCTRL,
-	USB_HID_MOD_LSHIFT,
-	USB_HID_MOD_LALT,
-	USB_HID_MOD_LGUI,
-	USB_HID_MOD_RCTRL,
-	USB_HID_MOD_RSHIFT,
-	USB_HID_MOD_RALT,
-	USB_HID_MOD_RGUI
-};
-
-#endif
-/**
- * @}
- */
Index: uspace/lib/usbhid/include/usb/classes/hidut.h
===================================================================
--- uspace/lib/usbhid/include/usb/classes/hidut.h	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
- * Copyright (c) 2010 Vojtech Horky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libusb
- * @{
- */
-/** @file
- * @brief USB HID Usage Tables.
- */
-#ifndef LIBUSB_HIDUT_H_
-#define LIBUSB_HIDUT_H_
-
-/** USB/HID Usage Pages. */
-typedef enum {
-	USB_HIDUT_PAGE_GENERIC_DESKTOP = 1,
-	USB_HIDUT_PAGE_SIMULATION = 2,
-	USB_HIDUT_PAGE_VR = 3,
-	USB_HIDUT_PAGE_SPORT = 4,
-	USB_HIDUT_PAGE_GAME = 5,
-	USB_HIDUT_PAGE_GENERIC_DEVICE = 6,
-	USB_HIDUT_PAGE_KEYBOARD = 7,
-	USB_HIDUT_PAGE_LED = 8,
-	USB_HIDUT_PAGE_BUTTON = 9,
-	USB_HIDUT_PAGE_ORDINAL = 0x0a,
-	USB_HIDUT_PAGE_TELEPHONY_DEVICE = 0x0b,
-	USB_HIDUT_PAGE_CONSUMER = 0x0c
-} usb_hidut_usage_page_t;
-
-/** Usages for Generic Desktop Page. */
-typedef enum {
-	USB_HIDUT_USAGE_GENERIC_DESKTOP_POINTER = 1,
-	USB_HIDUT_USAGE_GENERIC_DESKTOP_MOUSE = 2,
-	USB_HIDUT_USAGE_GENERIC_DESKTOP_JOYSTICK = 4,
-	USB_HIDUT_USAGE_GENERIC_DESKTOP_GAMEPAD = 5,
-	USB_HIDUT_USAGE_GENERIC_DESKTOP_KEYBOARD = 6,
-	USB_HIDUT_USAGE_GENERIC_DESKTOP_KEYPAD = 7,
-	USB_HIDUT_USAGE_GENERIC_DESKTOP_X = 0x30,
-	USB_HIDUT_USAGE_GENERIC_DESKTOP_Y = 0x31,
-	USB_HIDUT_USAGE_GENERIC_DESKTOP_WHEEL = 0x38
-	/* USB_HIDUT_USAGE_GENERIC_DESKTOP_ = , */
-	
-} usb_hidut_usage_generic_desktop_t;
-
-
-#endif
-/**
- * @}
- */
Index: uspace/lib/usbhid/include/usb/classes/hidutkbd.h
===================================================================
--- uspace/lib/usbhid/include/usb/classes/hidutkbd.h	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ 	(revision )
@@ -1,175 +1,0 @@
-/*
- * Copyright (c) 2010 Vojtech Horky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libusb
- * @{
- */
-/** @file
- * @brief USB HID key codes.
- * @details
- * This is not a typical header as by default it is equal to empty file.
- * However, by cleverly defining the USB_HIDUT_KBD_KEY you can use it
- * to generate conversion tables etc.
- *
- * For example, this creates enum for known keys:
- * @code
-#define USB_HIDUT_KBD_KEY(name, usage_id, l, lc, l1, l2) \
-	USB_KBD_KEY_##name = usage_id,
-typedef enum {
-	#include <usb/hidutkbd.h>
-} usb_key_code_t;
- @endcode
- *
- * Maybe, it might be better that you would place such enums into separate
- * files and create them as separate step before compiling to allow tools
- * such as Doxygen get the definitions right.
- *
- * @warning This file does not include guard to prevent multiple inclusions
- * into a single file.
- */
-
-
-#ifndef USB_HIDUT_KBD_KEY
-/** Declare keyboard key.
- * @param name Key name (identifier).
- * @param usage_id Key code (see Keyboard/Keypad Page (0x07) in HUT1.12.
- * @param letter Corresponding character (0 if not applicable).
- * @param letter_caps Corresponding character with Caps on.
- * @param letter_mod1 Corresponding character with modifier #1 on.
- * @param letter_mod2 Corresponding character with modifier #2 on.
- */
-#define USB_HIDUT_KBD_KEY(name, usage_id, letter, letter_caps, letter_mod1, letter_mod2)
-
-#endif
-
-#define __NONPRINT(name, usage_id) \
-	USB_HIDUT_KBD_KEY(name, usage_id, 0, 0, 0, 0)
-
-/* US alphabet letters */
-USB_HIDUT_KBD_KEY(A, 0x04, 'a', 'A', 0, 0)
-USB_HIDUT_KBD_KEY(B, 0x05, 'b', 'B', 0, 0)
-USB_HIDUT_KBD_KEY(C, 0x06, 'c', 'C', 0, 0)
-USB_HIDUT_KBD_KEY(D, 0x07, 'd', 'D', 0, 0)
-USB_HIDUT_KBD_KEY(E, 0x08, 'e', 'E', 0, 0)
-USB_HIDUT_KBD_KEY(F, 0x09, 'f', 'F', 0, 0)
-USB_HIDUT_KBD_KEY(G, 0x0A, 'g', 'G', 0, 0)
-USB_HIDUT_KBD_KEY(H, 0x0B, 'h', 'H', 0, 0)
-USB_HIDUT_KBD_KEY(I, 0x0C, 'i', 'I', 0, 0)
-USB_HIDUT_KBD_KEY(J, 0x0D, 'j', 'J', 0, 0)
-USB_HIDUT_KBD_KEY(K, 0x0E, 'k', 'K', 0, 0)
-USB_HIDUT_KBD_KEY(L, 0x0F, 'l', 'L', 0, 0)
-USB_HIDUT_KBD_KEY(M, 0x10, 'm', 'M', 0, 0)
-USB_HIDUT_KBD_KEY(N, 0x11, 'n', 'N', 0, 0)
-USB_HIDUT_KBD_KEY(O, 0x12, 'o', 'O', 0, 0)
-USB_HIDUT_KBD_KEY(P, 0x13, 'p', 'P', 0, 0)
-USB_HIDUT_KBD_KEY(Q, 0x14, 'q', 'Q', 0, 0)
-USB_HIDUT_KBD_KEY(R, 0x15, 'r', 'R', 0, 0)
-USB_HIDUT_KBD_KEY(S, 0x16, 's', 'S', 0, 0)
-USB_HIDUT_KBD_KEY(T, 0x17, 't', 'T', 0, 0)
-USB_HIDUT_KBD_KEY(U, 0x18, 'u', 'U', 0, 0)
-USB_HIDUT_KBD_KEY(V, 0x19, 'v', 'V', 0, 0)
-USB_HIDUT_KBD_KEY(W, 0x1A, 'w', 'W', 0, 0)
-USB_HIDUT_KBD_KEY(X, 0x1B, 'x', 'X', 0, 0)
-USB_HIDUT_KBD_KEY(Y, 0x1C, 'y', 'Y', 0, 0)
-USB_HIDUT_KBD_KEY(Z, 0x1D, 'z', 'Z', 0, 0)
-
-/* Keyboard digits */
-USB_HIDUT_KBD_KEY(1, 0x1E, '1', '!', 0, 0)
-USB_HIDUT_KBD_KEY(2, 0x1F, '2', '@', 0, 0)
-USB_HIDUT_KBD_KEY(3, 0x20, '3', '#', 0, 0)
-USB_HIDUT_KBD_KEY(4, 0x21, '4', '$', 0, 0)
-USB_HIDUT_KBD_KEY(5, 0x22, '5', '%', 0, 0)
-USB_HIDUT_KBD_KEY(6, 0x23, '6', '^', 0, 0)
-USB_HIDUT_KBD_KEY(7, 0x24, '7', '&', 0, 0)
-USB_HIDUT_KBD_KEY(8, 0x25, '8', '*', 0, 0)
-USB_HIDUT_KBD_KEY(9, 0x26, '9', '(', 0, 0)
-USB_HIDUT_KBD_KEY(0, 0x27, '0', ')', 0, 0)
-
-/* More-or-less typewriter command keys */
-USB_HIDUT_KBD_KEY(ENTER, 0x28, '\n', 0, 0, 0)
-USB_HIDUT_KBD_KEY(ESCAPE, 0x29, 0, 0, 0, 0)
-USB_HIDUT_KBD_KEY(BACKSPACE, 0x2A, '\b', 0, 0, 0)
-USB_HIDUT_KBD_KEY(TAB, 0x2B, '\t', 0, 0, 0)
-USB_HIDUT_KBD_KEY(SPACE, 0x2C, ' ', 0, 0, 0)
-
-/* Special (printable) characters */
-USB_HIDUT_KBD_KEY(DASH, 0x2D, '-', '_', 0, 0)
-USB_HIDUT_KBD_KEY(EQUALS, 0x2E, '=', '+', 0, 0)
-USB_HIDUT_KBD_KEY(LEFT_BRACKET, 0x2F, '[', '{', 0, 0)
-USB_HIDUT_KBD_KEY(RIGHT_BRACKET, 0x30, ']', '}', 0, 0)
-USB_HIDUT_KBD_KEY(BACKSLASH, 0x31, '\\', '|', 0, 0)
-USB_HIDUT_KBD_KEY(HASH, 0x32, '#', '~', 0, 0)
-USB_HIDUT_KBD_KEY(SEMICOLON, 0x33, ';', ':', 0, 0)
-USB_HIDUT_KBD_KEY(APOSTROPHE, 0x34, '\'', '"', 0, 0)
-USB_HIDUT_KBD_KEY(GRAVE_ACCENT, 0x35, '`', '~', 0, 0)
-USB_HIDUT_KBD_KEY(COMMA, 0x36, ',', '<', 0, 0)
-USB_HIDUT_KBD_KEY(PERIOD, 0x37, '.', '>', 0, 0)
-USB_HIDUT_KBD_KEY(SLASH, 0x38, '/', '?', 0, 0)
-
-USB_HIDUT_KBD_KEY(CAPS_LOCK, 0x39, 0, 0, 0, 0)
-
-/* Function keys */
-__NONPRINT( F1, 0x3A)
-__NONPRINT( F2, 0x3B)
-__NONPRINT( F3, 0x3C)
-__NONPRINT( F4, 0x3D)
-__NONPRINT( F5, 0x3E)
-__NONPRINT( F6, 0x3F)
-__NONPRINT( F7, 0x40)
-__NONPRINT( F8, 0x41)
-__NONPRINT( F9, 0x42)
-__NONPRINT(F10, 0x43)
-__NONPRINT(F11, 0x44)
-__NONPRINT(F12, 0x45)
-
-/* Cursor movement keys & co. */
-__NONPRINT(PRINT_SCREEN, 0x46)
-__NONPRINT(SCROLL_LOCK, 0x47)
-__NONPRINT(PAUSE, 0x48)
-__NONPRINT(INSERT, 0x49)
-__NONPRINT(HOME, 0x4A)
-__NONPRINT(PAGE_UP, 0x4B)
-__NONPRINT(DELETE, 0x4C)
-__NONPRINT(END, 0x4D)
-__NONPRINT(PAGE_DOWN, 0x4E)
-__NONPRINT(RIGHT_ARROW, 0x4F)
-__NONPRINT(LEFT_ARROW, 0x50)
-__NONPRINT(DOWN_ARROW, 0x51)
-__NONPRINT(UP_ARROW, 0x52)
-
-
-
-
-/* USB_HIDUT_KBD_KEY(, 0x, '', '', 0, 0) */
-
-#undef __NONPRINT
-
-/**
- * @}
- */
-
Index: uspace/lib/usbhid/include/usb/hid/hid.h
===================================================================
--- uspace/lib/usbhid/include/usb/hid/hid.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
+++ uspace/lib/usbhid/include/usb/hid/hid.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2010 Vojtech Horky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libusb
+ * @{
+ */
+/** @file
+ * @brief USB HID device related types.
+ */
+#ifndef LIBUSB_HID_H_
+#define LIBUSB_HID_H_
+
+#include <usb/usb.h>
+#include <usb/hid/hidparser.h>
+#include <usb/descriptor.h>
+
+/** USB/HID device requests. */
+typedef enum {
+	USB_HIDREQ_GET_REPORT = 1,
+	USB_HIDREQ_GET_IDLE = 2,
+	USB_HIDREQ_GET_PROTOCOL = 3,
+	/* Values 4 to 8 are reserved. */
+	USB_HIDREQ_SET_REPORT = 9,
+	USB_HIDREQ_SET_IDLE = 10,
+	USB_HIDREQ_SET_PROTOCOL = 11
+} usb_hid_request_t;
+
+typedef enum {
+	USB_HID_PROTOCOL_BOOT = 0,
+	USB_HID_PROTOCOL_REPORT = 1
+} usb_hid_protocol_t;
+
+/** USB/HID subclass constants. */
+typedef enum {
+	USB_HID_SUBCLASS_NONE = 0,
+	USB_HID_SUBCLASS_BOOT = 1
+} usb_hid_subclass_t;
+
+/** USB/HID interface protocols. */
+typedef enum {
+	USB_HID_PROTOCOL_NONE = 0,
+	USB_HID_PROTOCOL_KEYBOARD = 1,
+	USB_HID_PROTOCOL_MOUSE = 2
+} usb_hid_iface_protocol_t;
+
+
+#endif
+/**
+ * @}
+ */
Index: uspace/lib/usbhid/include/usb/hid/hid_report_items.h
===================================================================
--- uspace/lib/usbhid/include/usb/hid/hid_report_items.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
+++ uspace/lib/usbhid/include/usb/hid/hid_report_items.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2011 Matej Klonfar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libusb
+ * @{
+ */
+/** @file
+ * @brief USB HID parser.
+ */
+#ifndef LIBUSB_HID_REPORT_ITEMS_H_
+#define LIBUSB_HID_REPORT_ITEMS_H_
+
+#include <stdint.h>
+
+/**
+ * Item prefix
+ */
+#define USB_HID_ITEM_SIZE(data) 	((uint8_t)(data & 0x3))
+#define USB_HID_ITEM_TAG(data) 		((uint8_t)((data & 0xF0) >> 4))
+#define USB_HID_ITEM_TAG_CLASS(data)	((uint8_t)((data & 0xC) >> 2))
+#define USB_HID_ITEM_IS_LONG(data)	(data == 0xFE)
+
+
+/**
+ * Input/Output/Feature Item flags
+ */
+/** Constant (1) / Variable (0) */
+#define USB_HID_ITEM_FLAG_CONSTANT(flags) 	((flags & 0x1) == 0x1)
+/** Variable (1) / Array (0) */
+#define USB_HID_ITEM_FLAG_VARIABLE(flags) 	((flags & 0x2) == 0x2)
+/** Absolute / Relative*/
+#define USB_HID_ITEM_FLAG_RELATIVE(flags) 	((flags & 0x4) == 0x4)
+/** Wrap / No Wrap */
+#define USB_HID_ITEM_FLAG_WRAP(flags)		((flags & 0x8) == 0x8)
+#define USB_HID_ITEM_FLAG_LINEAR(flags)		((flags & 0x10) == 0x10)
+#define USB_HID_ITEM_FLAG_PREFERRED(flags)	((flags & 0x20) == 0x20)
+#define USB_HID_ITEM_FLAG_POSITION(flags)	((flags & 0x40) == 0x40)
+#define USB_HID_ITEM_FLAG_VOLATILE(flags)	((flags & 0x80) == 0x80)
+#define USB_HID_ITEM_FLAG_BUFFERED(flags)	((flags & 0x100) == 0x100)
+
+/* MAIN ITEMS */
+#define USB_HID_TAG_CLASS_MAIN				0x0
+#define USB_HID_REPORT_TAG_INPUT			0x8
+#define USB_HID_REPORT_TAG_OUTPUT			0x9
+#define USB_HID_REPORT_TAG_FEATURE			0xB
+#define USB_HID_REPORT_TAG_COLLECTION		0xA
+#define USB_HID_REPORT_TAG_END_COLLECTION	0xC
+
+/* GLOBAL ITEMS */
+#define USB_HID_TAG_CLASS_GLOBAL			0x1
+#define USB_HID_REPORT_TAG_USAGE_PAGE		0x0
+#define USB_HID_REPORT_TAG_LOGICAL_MINIMUM	0x1
+#define USB_HID_REPORT_TAG_LOGICAL_MAXIMUM	0x2
+#define USB_HID_REPORT_TAG_PHYSICAL_MINIMUM 0x3
+#define USB_HID_REPORT_TAG_PHYSICAL_MAXIMUM 0x4
+#define USB_HID_REPORT_TAG_UNIT_EXPONENT	0x5
+#define USB_HID_REPORT_TAG_UNIT				0x6
+#define USB_HID_REPORT_TAG_REPORT_SIZE		0x7
+#define USB_HID_REPORT_TAG_REPORT_ID		0x8
+#define USB_HID_REPORT_TAG_REPORT_COUNT		0x9
+#define USB_HID_REPORT_TAG_PUSH				0xA
+#define USB_HID_REPORT_TAG_POP				0xB
+
+
+/* LOCAL ITEMS */
+#define USB_HID_TAG_CLASS_LOCAL					0x2
+#define USB_HID_REPORT_TAG_USAGE				0x0
+#define USB_HID_REPORT_TAG_USAGE_MINIMUM		0x1
+#define USB_HID_REPORT_TAG_USAGE_MAXIMUM		0x2
+#define USB_HID_REPORT_TAG_DESIGNATOR_INDEX		0x3
+#define USB_HID_REPORT_TAG_DESIGNATOR_MINIMUM	0x4
+#define USB_HID_REPORT_TAG_DESIGNATOR_MAXIMUM	0x5
+#define USB_HID_REPORT_TAG_STRING_INDEX			0x7
+#define USB_HID_REPORT_TAG_STRING_MINIMUM		0x8
+#define USB_HID_REPORT_TAG_STRING_MAXIMUM		0x9
+#define USB_HID_REPORT_TAG_DELIMITER			0xA
+
+#endif
+/**
+ * @}
+ */
Index: uspace/lib/usbhid/include/usb/hid/hiddescriptor.h
===================================================================
--- uspace/lib/usbhid/include/usb/hid/hiddescriptor.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
+++ uspace/lib/usbhid/include/usb/hid/hiddescriptor.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2011 Matej Klonfar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libusb
+ * @{
+ */
+/** @file
+ * USB HID report descriptor and report data parser
+ */
+#ifndef LIBUSB_HIDDESCRIPTOR_H_
+#define LIBUSB_HIDDESCRIPTOR_H_
+
+#include <stdint.h>
+#include <adt/list.h>
+#include <usb/hid/hid_report_items.h>
+#include <usb/hid/hidpath.h>
+#include <usb/hid/hidtypes.h>
+
+
+/*
+ * Descriptor parser functions
+ */
+
+/** */
+int usb_hid_parse_report_descriptor(usb_hid_report_t *report, 
+                                    const uint8_t *data, size_t size);
+
+/** */
+void usb_hid_free_report(usb_hid_report_t *report);
+
+/** */
+void usb_hid_descriptor_print(usb_hid_report_t *report);
+
+
+int usb_hid_report_init(usb_hid_report_t *report);
+int usb_hid_report_append_fields(usb_hid_report_t *report, 
+                                 usb_hid_report_item_t *report_item);
+
+usb_hid_report_description_t * usb_hid_report_find_description(const usb_hid_report_t *report, uint8_t report_id, usb_hid_report_type_t type);
+int usb_hid_report_parse_tag(uint8_t tag, uint8_t class, const uint8_t *data, size_t item_size,
+                             usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path);
+int usb_hid_report_parse_main_tag(uint8_t tag, const uint8_t *data, size_t item_size,
+                             usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path);
+int usb_hid_report_parse_global_tag(uint8_t tag, const uint8_t *data, size_t item_size,
+                             usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path);
+int usb_hid_report_parse_local_tag(uint8_t tag, const uint8_t *data, size_t item_size,
+                             usb_hid_report_item_t *report_item, usb_hid_report_path_t *usage_path);
+
+void usb_hid_descriptor_print_list(link_t *head);
+void usb_hid_report_reset_local_items(usb_hid_report_item_t *report_item);
+void usb_hid_free_report_list(link_t *head);
+usb_hid_report_item_t *usb_hid_report_item_clone(const usb_hid_report_item_t *item);
+uint32_t usb_hid_report_tag_data_uint32(const uint8_t *data, size_t size);
+
+usb_hid_report_path_t *usb_hid_report_path_try_insert(usb_hid_report_t *report, usb_hid_report_path_t *cmp_path);
+#endif
+/**
+ * @}
+ */
Index: uspace/lib/usbhid/include/usb/hid/hidparser.h
===================================================================
--- uspace/lib/usbhid/include/usb/hid/hidparser.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
+++ uspace/lib/usbhid/include/usb/hid/hidparser.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2011 Matej Klonfar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libusb
+ * @{
+ */
+/** @file
+ * USB HID report descriptor and report data parser
+ */
+#ifndef LIBUSB_HIDPARSER_H_
+#define LIBUSB_HIDPARSER_H_
+
+#include <stdint.h>
+#include <adt/list.h>
+#include <usb/hid/hid_report_items.h>
+#include <usb/hid/hidpath.h>
+#include <usb/hid/hidtypes.h>
+#include <usb/hid/hiddescriptor.h>
+
+
+/*
+ * Input report parser functions
+ */
+/** */
+int usb_hid_parse_report(const usb_hid_report_t *report, const uint8_t *data, 
+                         size_t size, uint8_t *report_id);
+
+/** */
+size_t usb_hid_report_input_length(const usb_hid_report_t *report,
+	usb_hid_report_path_t *path, int flags);
+
+/*
+ * Output report parser functions
+ */
+/** Allocates output report buffer*/
+uint8_t *usb_hid_report_output(usb_hid_report_t *report, size_t *size, 
+                               uint8_t report_id);
+
+/** Frees output report buffer*/
+void usb_hid_report_output_free(uint8_t *output);
+
+/** Returns size of output for given usage path */
+size_t usb_hid_report_output_size(usb_hid_report_t *report,
+                                  usb_hid_report_path_t *path, int flags);
+
+/** Makes the output report buffer by translated given data */
+int usb_hid_report_output_translate(usb_hid_report_t *report, uint8_t report_id, 
+                                    uint8_t *buffer, size_t size);
+
+/** */
+usb_hid_report_field_t *usb_hid_report_get_sibling(usb_hid_report_t *report, 
+                                                   usb_hid_report_field_t *field, 
+                                                   usb_hid_report_path_t *path, 
+                                                   int flags, 
+                                                   usb_hid_report_type_t type);
+
+/** */
+uint8_t usb_hid_report_get_report_id(usb_hid_report_t *report, 
+                                     uint8_t report_id, 
+                                     usb_hid_report_type_t type);
+
+#endif
+/**
+ * @}
+ */
Index: uspace/lib/usbhid/include/usb/hid/hidpath.h
===================================================================
--- uspace/lib/usbhid/include/usb/hid/hidpath.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
+++ uspace/lib/usbhid/include/usb/hid/hidpath.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2011 Matej Klonfar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libusb
+ * @{
+ */
+/** @file
+ * USB HID report descriptor and report data parser
+ */
+#ifndef LIBUSB_HIDPATH_H_
+#define LIBUSB_HIDPATH_H_
+
+#include <usb/hid/hidparser.h>
+#include <stdint.h>
+#include <adt/list.h>
+
+/**
+ * Description of path of usage pages and usages in report descriptor
+ */
+/** Wanted usage path must be exactly the same as the searched one */
+#define USB_HID_PATH_COMPARE_STRICT		0
+/** Wanted usage path must be the suffix in the searched one */
+#define USB_HID_PATH_COMPARE_END		1
+/** */
+#define USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY	2
+/** Searched usage page must be prefix of the other one */
+#define USB_HID_PATH_COMPARE_BEGIN		4
+/** Searched couple of usage page and usage can be anywhere in usage path */
+#define USB_HID_PATH_COMPARE_ANYWHERE		8
+
+
+/** Collection usage path structure */
+typedef struct {
+	/** */
+	uint32_t usage_page;
+	/** */	
+	uint32_t usage;
+
+	uint8_t flags;
+	/** */
+	link_t link;
+} usb_hid_report_usage_path_t;
+
+/** */
+typedef struct {
+	/** */	
+	int depth;	
+	uint8_t report_id;
+	
+	/** */	
+	link_t link; /* list */
+
+	link_t head; /* head of list of usage paths */
+
+} usb_hid_report_path_t;
+
+/** */
+usb_hid_report_path_t *usb_hid_report_path(void);
+
+/** */
+void usb_hid_report_path_free(usb_hid_report_path_t *path);
+
+/** */
+int usb_hid_report_path_set_report_id(usb_hid_report_path_t *usage_path, 
+                                      uint8_t report_id);
+
+/** */
+int usb_hid_report_path_append_item(usb_hid_report_path_t *usage_path, 
+                                    int32_t usage_page, int32_t usage);
+
+/** */
+void usb_hid_report_remove_last_item(usb_hid_report_path_t *usage_path);
+
+/** */
+void usb_hid_report_null_last_item(usb_hid_report_path_t *usage_path);
+
+/** */
+void usb_hid_report_set_last_item(usb_hid_report_path_t *usage_path, 
+                                  int32_t tag, int32_t data);
+
+/** */
+int usb_hid_report_compare_usage_path(usb_hid_report_path_t *report_path, 
+                                      usb_hid_report_path_t *path, int flags);
+
+/** */
+usb_hid_report_path_t *usb_hid_report_path_clone(usb_hid_report_path_t *usage_path);
+
+void usb_hid_print_usage_path(usb_hid_report_path_t *path);
+
+#endif
+/**
+ * @}
+ */
Index: uspace/lib/usbhid/include/usb/hid/hidreport.h
===================================================================
--- uspace/lib/usbhid/include/usb/hid/hidreport.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
+++ uspace/lib/usbhid/include/usb/hid/hidreport.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2011 Lubos Slovak
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libusb
+ * @{
+ */
+/** @file
+ * USB HID report parser initialization from descriptors.
+ */
+
+#ifndef LIBUSB_HIDREPORT_H_
+#define LIBUSB_HIDREPORT_H_
+
+#include <usb/dev/driver.h>
+#include <usb/hid/hidparser.h>
+
+/**
+ * Retrieves the Report descriptor from the USB device and initializes the
+ * report parser.
+ *
+ * \param dev USB device representing a HID device.
+ * \param parser HID Report parser.
+ *
+ * \retval EOK if successful.
+ * \retval EINVAL if one of the parameters is not given (is NULL).
+ * \retval ENOENT if there are some descriptors missing.
+ * \retval ENOMEM if an error with allocation occured.
+ * \retval EINVAL if the Report descriptor's size does not match the size 
+ *         from the interface descriptor.
+ * \return Other value inherited from function usb_pipe_start_session(),
+ *         usb_pipe_end_session() or usb_request_get_descriptor().
+ */
+int usb_hid_process_report_descriptor(usb_device_t *dev, 
+    usb_hid_report_t *report);
+
+#endif /* LIBUSB_HIDREPORT_H_ */
+
+/**
+ * @}
+ */
Index: uspace/lib/usbhid/include/usb/hid/hidtypes.h
===================================================================
--- uspace/lib/usbhid/include/usb/hid/hidtypes.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
+++ uspace/lib/usbhid/include/usb/hid/hidtypes.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -0,0 +1,210 @@
+/*
+ * Copyright (c) 2011 Matej Klonfar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libusb
+ * @{
+ */
+/** @file
+ * USB HID report descriptor and report data parser
+ */
+#ifndef LIBUSB_HIDTYPES_H_
+#define LIBUSB_HIDTYPES_H_
+
+#include <stdint.h>
+#include <adt/list.h>
+
+#define USB_HID_MAX_USAGES	20
+
+#define USB_HID_UINT32_TO_INT32(x, size)	((((x) & (1 << ((size) - 1))) != 0) ? -(~(x - 1) & ((1 << size) - 1)) : (x)) //(-(~((x) - 1)))
+#define USB_HID_INT32_TO_UINT32(x, size)	(((x) < 0 ) ? ((1 << (size)) + (x)) : (x))
+
+
+typedef enum {
+	USB_HID_REPORT_TYPE_INPUT = 1,
+	USB_HID_REPORT_TYPE_OUTPUT = 2,
+	USB_HID_REPORT_TYPE_FEATURE = 3
+} usb_hid_report_type_t;
+
+
+typedef struct {
+	/** */
+	int report_count;
+	link_t reports;		/** list of usb_hid_report_description_t */
+
+	link_t collection_paths;
+	int collection_paths_count;
+
+	int use_report_ids;
+	uint8_t last_report_id;
+	
+} usb_hid_report_t;
+
+typedef struct {
+	uint8_t report_id;
+	usb_hid_report_type_t type;
+
+	size_t bit_length;
+	size_t item_length;
+	
+	link_t report_items;	/** list of report items (fields) */
+
+	link_t link;
+} usb_hid_report_description_t;
+
+typedef struct {
+
+	int offset;
+	size_t size;
+
+	uint16_t usage_page;
+	uint16_t usage;
+
+	uint8_t item_flags;
+	usb_hid_report_path_t *collection_path;
+
+	int32_t logical_minimum;
+	int32_t logical_maximum;
+	int32_t physical_minimum;
+	int32_t physical_maximum;
+	uint32_t usage_minimum;
+	uint32_t usage_maximum;
+	uint32_t unit;
+	uint32_t unit_exponent;
+	
+
+	int32_t value;
+
+	link_t link;
+} usb_hid_report_field_t;
+
+
+
+/**
+ * state table
+ */
+typedef struct {
+	/** report id */	
+	int32_t id;
+	
+	/** */
+	uint16_t extended_usage_page;
+	uint32_t usages[USB_HID_MAX_USAGES];
+	int usages_count;
+
+	/** */
+	uint32_t usage_page;
+
+	/** */	
+	uint32_t usage_minimum;
+	/** */	
+	uint32_t usage_maximum;
+	/** */	
+	int32_t logical_minimum;
+	/** */	
+	int32_t logical_maximum;
+	/** */	
+	int32_t size;
+	/** */	
+	int32_t count;
+	/** */	
+	size_t offset;
+	/** */	
+	int32_t unit_exponent;
+	/** */	
+	int32_t unit;
+
+	/** */
+	uint32_t string_index;
+	/** */	
+	uint32_t string_minimum;
+	/** */	
+	uint32_t string_maximum;
+	/** */	
+	uint32_t designator_index;
+	/** */	
+	uint32_t designator_minimum;
+	/** */	
+	uint32_t designator_maximum;
+	/** */	
+	int32_t physical_minimum;
+	/** */	
+	int32_t physical_maximum;
+
+	/** */	
+	uint8_t item_flags;
+
+	usb_hid_report_type_t type;
+
+	/** current collection path*/	
+	usb_hid_report_path_t *usage_path;
+	/** */	
+	link_t link;
+
+	int in_delimiter;
+} usb_hid_report_item_t;
+
+/** HID parser callbacks for IN items. */
+typedef struct {
+	/** Callback for keyboard.
+	 *
+	 * @param key_codes Array of pressed key (including modifiers).
+	 * @param count Length of @p key_codes.
+	 * @param arg Custom argument.
+	 */
+	void (*keyboard)(const uint8_t *key_codes, size_t count, const uint8_t report_id, void *arg);
+} usb_hid_report_in_callbacks_t;
+
+
+typedef enum {
+	USB_HID_MOD_LCTRL = 0x01,
+	USB_HID_MOD_LSHIFT = 0x02,
+	USB_HID_MOD_LALT = 0x04,
+	USB_HID_MOD_LGUI = 0x08,
+	USB_HID_MOD_RCTRL = 0x10,
+	USB_HID_MOD_RSHIFT = 0x20,
+	USB_HID_MOD_RALT = 0x40,
+	USB_HID_MOD_RGUI = 0x80,
+	USB_HID_MOD_COUNT = 8
+} usb_hid_modifiers_t;
+
+static const usb_hid_modifiers_t 
+    usb_hid_modifiers_consts[USB_HID_MOD_COUNT] = {
+	USB_HID_MOD_LCTRL,
+	USB_HID_MOD_LSHIFT,
+	USB_HID_MOD_LALT,
+	USB_HID_MOD_LGUI,
+	USB_HID_MOD_RCTRL,
+	USB_HID_MOD_RSHIFT,
+	USB_HID_MOD_RALT,
+	USB_HID_MOD_RGUI
+};
+
+#endif
+/**
+ * @}
+ */
Index: uspace/lib/usbhid/include/usb/hid/iface.h
===================================================================
--- uspace/lib/usbhid/include/usb/hid/iface.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
+++ uspace/lib/usbhid/include/usb/hid/iface.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2011 Vojtech Horky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libusb
+ * @{
+ */
+/** @file
+ * Client functions for accessing USB HID interface.
+ */
+#ifndef LIBUSB_CLASSES_HID_IFACE_H_
+#define LIBUSB_CLASSES_HID_IFACE_H_
+
+#include <sys/types.h>
+
+int usbhid_dev_get_event_length(int);
+int usbhid_dev_get_event(int, uint16_t *, uint16_t *, size_t, size_t *,
+    unsigned int);
+
+#endif
+/**
+ * @}
+ */
Index: uspace/lib/usbhid/include/usb/hid/request.h
===================================================================
--- uspace/lib/usbhid/include/usb/hid/request.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
+++ uspace/lib/usbhid/include/usb/hid/request.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2011 Lubos Slovak
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libusb
+ * @{
+ */
+/** @file
+ * HID class-specific requests.
+ */
+
+#ifndef USB_KBD_HIDREQ_H_
+#define USB_KBD_HIDREQ_H_
+
+#include <stdint.h>
+
+#include <usb/hid/hid.h>
+#include <usb/dev/pipes.h>
+
+/*----------------------------------------------------------------------------*/
+
+int usbhid_req_set_report(usb_pipe_t *ctrl_pipe, int iface_no,
+    usb_hid_report_type_t type, uint8_t *buffer, size_t buf_size);
+
+int usbhid_req_set_protocol(usb_pipe_t *ctrl_pipe, int iface_no, 
+    usb_hid_protocol_t protocol);
+
+int usbhid_req_set_idle(usb_pipe_t *ctrl_pipe, int iface_no, uint8_t duration);
+
+int usbhid_req_get_report(usb_pipe_t *ctrl_pipe, int iface_no, 
+    usb_hid_report_type_t type, uint8_t *buffer, size_t buf_size, 
+    size_t *actual_size);
+
+int usbhid_req_get_protocol(usb_pipe_t *ctrl_pipe, int iface_no, 
+    usb_hid_protocol_t *protocol);
+
+int usbhid_req_get_idle(usb_pipe_t *ctrl_pipe, int iface_no, uint8_t *duration);
+
+/*----------------------------------------------------------------------------*/
+
+#endif /* USB_KBD_HIDREQ_H_ */
+
+/**
+ * @}
+ */
Index: uspace/lib/usbhid/include/usb/hid/usages/core.h
===================================================================
--- uspace/lib/usbhid/include/usb/hid/usages/core.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
+++ uspace/lib/usbhid/include/usb/hid/usages/core.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2010 Vojtech Horky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libusb
+ * @{
+ */
+/** @file
+ * @brief USB HID Usage Tables.
+ */
+#ifndef LIBUSB_HIDUT_H_
+#define LIBUSB_HIDUT_H_
+
+/** USB/HID Usage Pages. */
+typedef enum {
+	USB_HIDUT_PAGE_GENERIC_DESKTOP = 1,
+	USB_HIDUT_PAGE_SIMULATION = 2,
+	USB_HIDUT_PAGE_VR = 3,
+	USB_HIDUT_PAGE_SPORT = 4,
+	USB_HIDUT_PAGE_GAME = 5,
+	USB_HIDUT_PAGE_GENERIC_DEVICE = 6,
+	USB_HIDUT_PAGE_KEYBOARD = 7,
+	USB_HIDUT_PAGE_LED = 8,
+	USB_HIDUT_PAGE_BUTTON = 9,
+	USB_HIDUT_PAGE_ORDINAL = 0x0a,
+	USB_HIDUT_PAGE_TELEPHONY_DEVICE = 0x0b,
+	USB_HIDUT_PAGE_CONSUMER = 0x0c
+} usb_hidut_usage_page_t;
+
+/** Usages for Generic Desktop Page. */
+typedef enum {
+	USB_HIDUT_USAGE_GENERIC_DESKTOP_POINTER = 1,
+	USB_HIDUT_USAGE_GENERIC_DESKTOP_MOUSE = 2,
+	USB_HIDUT_USAGE_GENERIC_DESKTOP_JOYSTICK = 4,
+	USB_HIDUT_USAGE_GENERIC_DESKTOP_GAMEPAD = 5,
+	USB_HIDUT_USAGE_GENERIC_DESKTOP_KEYBOARD = 6,
+	USB_HIDUT_USAGE_GENERIC_DESKTOP_KEYPAD = 7,
+	USB_HIDUT_USAGE_GENERIC_DESKTOP_X = 0x30,
+	USB_HIDUT_USAGE_GENERIC_DESKTOP_Y = 0x31,
+	USB_HIDUT_USAGE_GENERIC_DESKTOP_WHEEL = 0x38
+	/* USB_HIDUT_USAGE_GENERIC_DESKTOP_ = , */
+	
+} usb_hidut_usage_generic_desktop_t;
+
+
+#endif
+/**
+ * @}
+ */
Index: uspace/lib/usbhid/include/usb/hid/usages/kbdgen.h
===================================================================
--- uspace/lib/usbhid/include/usb/hid/usages/kbdgen.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
+++ uspace/lib/usbhid/include/usb/hid/usages/kbdgen.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -0,0 +1,175 @@
+/*
+ * Copyright (c) 2010 Vojtech Horky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libusb
+ * @{
+ */
+/** @file
+ * @brief USB HID key codes.
+ * @details
+ * This is not a typical header as by default it is equal to empty file.
+ * However, by cleverly defining the USB_HIDUT_KBD_KEY you can use it
+ * to generate conversion tables etc.
+ *
+ * For example, this creates enum for known keys:
+ * @code
+#define USB_HIDUT_KBD_KEY(name, usage_id, l, lc, l1, l2) \
+	USB_KBD_KEY_##name = usage_id,
+typedef enum {
+	#include <usb/hidutkbd.h>
+} usb_key_code_t;
+ @endcode
+ *
+ * Maybe, it might be better that you would place such enums into separate
+ * files and create them as separate step before compiling to allow tools
+ * such as Doxygen get the definitions right.
+ *
+ * @warning This file does not include guard to prevent multiple inclusions
+ * into a single file.
+ */
+
+
+#ifndef USB_HIDUT_KBD_KEY
+/** Declare keyboard key.
+ * @param name Key name (identifier).
+ * @param usage_id Key code (see Keyboard/Keypad Page (0x07) in HUT1.12.
+ * @param letter Corresponding character (0 if not applicable).
+ * @param letter_caps Corresponding character with Caps on.
+ * @param letter_mod1 Corresponding character with modifier #1 on.
+ * @param letter_mod2 Corresponding character with modifier #2 on.
+ */
+#define USB_HIDUT_KBD_KEY(name, usage_id, letter, letter_caps, letter_mod1, letter_mod2)
+
+#endif
+
+#define __NONPRINT(name, usage_id) \
+	USB_HIDUT_KBD_KEY(name, usage_id, 0, 0, 0, 0)
+
+/* US alphabet letters */
+USB_HIDUT_KBD_KEY(A, 0x04, 'a', 'A', 0, 0)
+USB_HIDUT_KBD_KEY(B, 0x05, 'b', 'B', 0, 0)
+USB_HIDUT_KBD_KEY(C, 0x06, 'c', 'C', 0, 0)
+USB_HIDUT_KBD_KEY(D, 0x07, 'd', 'D', 0, 0)
+USB_HIDUT_KBD_KEY(E, 0x08, 'e', 'E', 0, 0)
+USB_HIDUT_KBD_KEY(F, 0x09, 'f', 'F', 0, 0)
+USB_HIDUT_KBD_KEY(G, 0x0A, 'g', 'G', 0, 0)
+USB_HIDUT_KBD_KEY(H, 0x0B, 'h', 'H', 0, 0)
+USB_HIDUT_KBD_KEY(I, 0x0C, 'i', 'I', 0, 0)
+USB_HIDUT_KBD_KEY(J, 0x0D, 'j', 'J', 0, 0)
+USB_HIDUT_KBD_KEY(K, 0x0E, 'k', 'K', 0, 0)
+USB_HIDUT_KBD_KEY(L, 0x0F, 'l', 'L', 0, 0)
+USB_HIDUT_KBD_KEY(M, 0x10, 'm', 'M', 0, 0)
+USB_HIDUT_KBD_KEY(N, 0x11, 'n', 'N', 0, 0)
+USB_HIDUT_KBD_KEY(O, 0x12, 'o', 'O', 0, 0)
+USB_HIDUT_KBD_KEY(P, 0x13, 'p', 'P', 0, 0)
+USB_HIDUT_KBD_KEY(Q, 0x14, 'q', 'Q', 0, 0)
+USB_HIDUT_KBD_KEY(R, 0x15, 'r', 'R', 0, 0)
+USB_HIDUT_KBD_KEY(S, 0x16, 's', 'S', 0, 0)
+USB_HIDUT_KBD_KEY(T, 0x17, 't', 'T', 0, 0)
+USB_HIDUT_KBD_KEY(U, 0x18, 'u', 'U', 0, 0)
+USB_HIDUT_KBD_KEY(V, 0x19, 'v', 'V', 0, 0)
+USB_HIDUT_KBD_KEY(W, 0x1A, 'w', 'W', 0, 0)
+USB_HIDUT_KBD_KEY(X, 0x1B, 'x', 'X', 0, 0)
+USB_HIDUT_KBD_KEY(Y, 0x1C, 'y', 'Y', 0, 0)
+USB_HIDUT_KBD_KEY(Z, 0x1D, 'z', 'Z', 0, 0)
+
+/* Keyboard digits */
+USB_HIDUT_KBD_KEY(1, 0x1E, '1', '!', 0, 0)
+USB_HIDUT_KBD_KEY(2, 0x1F, '2', '@', 0, 0)
+USB_HIDUT_KBD_KEY(3, 0x20, '3', '#', 0, 0)
+USB_HIDUT_KBD_KEY(4, 0x21, '4', '$', 0, 0)
+USB_HIDUT_KBD_KEY(5, 0x22, '5', '%', 0, 0)
+USB_HIDUT_KBD_KEY(6, 0x23, '6', '^', 0, 0)
+USB_HIDUT_KBD_KEY(7, 0x24, '7', '&', 0, 0)
+USB_HIDUT_KBD_KEY(8, 0x25, '8', '*', 0, 0)
+USB_HIDUT_KBD_KEY(9, 0x26, '9', '(', 0, 0)
+USB_HIDUT_KBD_KEY(0, 0x27, '0', ')', 0, 0)
+
+/* More-or-less typewriter command keys */
+USB_HIDUT_KBD_KEY(ENTER, 0x28, '\n', 0, 0, 0)
+USB_HIDUT_KBD_KEY(ESCAPE, 0x29, 0, 0, 0, 0)
+USB_HIDUT_KBD_KEY(BACKSPACE, 0x2A, '\b', 0, 0, 0)
+USB_HIDUT_KBD_KEY(TAB, 0x2B, '\t', 0, 0, 0)
+USB_HIDUT_KBD_KEY(SPACE, 0x2C, ' ', 0, 0, 0)
+
+/* Special (printable) characters */
+USB_HIDUT_KBD_KEY(DASH, 0x2D, '-', '_', 0, 0)
+USB_HIDUT_KBD_KEY(EQUALS, 0x2E, '=', '+', 0, 0)
+USB_HIDUT_KBD_KEY(LEFT_BRACKET, 0x2F, '[', '{', 0, 0)
+USB_HIDUT_KBD_KEY(RIGHT_BRACKET, 0x30, ']', '}', 0, 0)
+USB_HIDUT_KBD_KEY(BACKSLASH, 0x31, '\\', '|', 0, 0)
+USB_HIDUT_KBD_KEY(HASH, 0x32, '#', '~', 0, 0)
+USB_HIDUT_KBD_KEY(SEMICOLON, 0x33, ';', ':', 0, 0)
+USB_HIDUT_KBD_KEY(APOSTROPHE, 0x34, '\'', '"', 0, 0)
+USB_HIDUT_KBD_KEY(GRAVE_ACCENT, 0x35, '`', '~', 0, 0)
+USB_HIDUT_KBD_KEY(COMMA, 0x36, ',', '<', 0, 0)
+USB_HIDUT_KBD_KEY(PERIOD, 0x37, '.', '>', 0, 0)
+USB_HIDUT_KBD_KEY(SLASH, 0x38, '/', '?', 0, 0)
+
+USB_HIDUT_KBD_KEY(CAPS_LOCK, 0x39, 0, 0, 0, 0)
+
+/* Function keys */
+__NONPRINT( F1, 0x3A)
+__NONPRINT( F2, 0x3B)
+__NONPRINT( F3, 0x3C)
+__NONPRINT( F4, 0x3D)
+__NONPRINT( F5, 0x3E)
+__NONPRINT( F6, 0x3F)
+__NONPRINT( F7, 0x40)
+__NONPRINT( F8, 0x41)
+__NONPRINT( F9, 0x42)
+__NONPRINT(F10, 0x43)
+__NONPRINT(F11, 0x44)
+__NONPRINT(F12, 0x45)
+
+/* Cursor movement keys & co. */
+__NONPRINT(PRINT_SCREEN, 0x46)
+__NONPRINT(SCROLL_LOCK, 0x47)
+__NONPRINT(PAUSE, 0x48)
+__NONPRINT(INSERT, 0x49)
+__NONPRINT(HOME, 0x4A)
+__NONPRINT(PAGE_UP, 0x4B)
+__NONPRINT(DELETE, 0x4C)
+__NONPRINT(END, 0x4D)
+__NONPRINT(PAGE_DOWN, 0x4E)
+__NONPRINT(RIGHT_ARROW, 0x4F)
+__NONPRINT(LEFT_ARROW, 0x50)
+__NONPRINT(DOWN_ARROW, 0x51)
+__NONPRINT(UP_ARROW, 0x52)
+
+
+
+
+/* USB_HIDUT_KBD_KEY(, 0x, '', '', 0, 0) */
+
+#undef __NONPRINT
+
+/**
+ * @}
+ */
+
Index: uspace/lib/usbhid/include/usb/hid/usages/led.h
===================================================================
--- uspace/lib/usbhid/include/usb/hid/usages/led.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
+++ uspace/lib/usbhid/include/usb/hid/usages/led.h	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2010 Lubos Slovak
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libusb
+ * @{
+ */
+/** @file
+ * @brief USB HID Usage Tables - LED page.
+ */
+#ifndef LIBUSB_UTLED_H_
+#define LIBUSB_UTLED_H_
+
+typedef enum {
+	USB_HID_LED_UNDEFINED = 0,
+	USB_HID_LED_NUM_LOCK,
+	USB_HID_LED_CAPS_LOCK,
+	USB_HID_LED_SCROLL_LOCK,
+	USB_HID_LED_COMPOSE,
+	USB_HID_LED_KANA,
+	USB_HID_LED_POWER,
+	USB_HID_LED_SHIFT,
+	USB_HID_LED_DND,
+	USB_HID_LED_MUTE,
+	USB_HID_LED_TONE_ENABLE,
+	USB_HID_LED_HIGH_CUT_FILTER,
+	USB_HID_LED_LOW_CUT_FILTER,
+	USB_HID_LED_EQ_ENABLE,
+	USB_HID_LED_SOUND_FIELD_ON,
+	USB_HID_LED_SURROUND_ON,
+	USB_HID_LED_REPEAT,
+	USB_HID_LED_STEREO,
+	USB_HID_LED_SAMPLING_RATE_DETECT,
+	USB_HID_LED_SPINNING,
+	USB_HID_LED_CAV,
+	USB_HID_LED_CLV,
+	USB_HID_LED_RECORDING_FORMAT_DETECT,
+	USB_HID_LED_OFF_HOOK,
+	USB_HID_LED_RING,
+	USB_HID_LED_MESSAGE_WAITING,
+	USB_HID_LED_DATA_MODE,
+	USB_HID_LED_BATTERY_OPERATION,
+	USB_HID_LED_BATTERY_OK,
+	USB_HID_LED_BATTERY_LOW,
+	USB_HID_LED_SPEAKER,
+	USB_HID_LED_HEAD_SET,
+	USB_HID_LED_HOLD,
+	USB_HID_LED_MICRO,
+	USB_HID_LED_COVERAGE,
+	USB_HID_LED_NIGHT_MODE,
+	USB_HID_LED_SEND_CALLS,
+	USB_HID_LED_CALL_PICKUP,
+	USB_HID_LED_CONFERENCE,
+	USB_HID_LED_STAND_BY,
+	USB_HID_LED_CAMERA_ON,
+	USB_HID_LED_CAMERA_OFF,
+	USB_HID_LED_ON_LINE,
+	USB_HID_LED_OFF_LINE,
+	USB_HID_LED_BUSY,
+	USB_HID_LED_READY,
+	USB_HID_LED_PAPER_OUT,
+	USB_HID_LED_PAPER_JAM,
+	USB_HID_LED_REMOTE,
+	USB_HID_LED_FORWARD,
+	USB_HID_LED_REVERSE,
+	USB_HID_LED_STOP,
+	USB_HID_LED_REWIND,
+	USB_HID_LED_FAST_FORWARD,
+	USB_HID_LED_PLAY,
+	USB_HID_LED_PAUSE,
+	USB_HID_LED_RECORD,
+	USB_HID_LED_ERROR,
+	USB_HID_LED_USAGE_SELECTED_IND,
+	USB_HID_LED_USAGE_IN_USE_IND,
+	USB_HID_LED_USAGE_MULTI_MODE_IND,
+	USB_HID_LED_IND_ON,
+	USB_HID_LED_IND_FLASH,
+	USB_HID_LED_IND_SLOW_BLINK,
+	USB_HID_LED_IND_FAST_BLINK,
+	USB_HID_LED_IND_OFF,
+	USB_HID_LED_FLASH_ON_TIME,
+	USB_HID_LED_SLOW_BLINK_ON_TIME,
+	USB_HID_LED_SLOW_BLINK_OFF_TIME,
+	USB_HID_LED_FAST_BLINK_ON_TIME,
+	USB_HID_LED_FAST_BLINK_OFF_TIME,
+	USB_HID_LED_USAGE_IND_COLOR,
+	USB_HID_LED_IND_RED,
+	USB_HID_LED_IND_GREEN,
+	USB_HID_LED_IND_AMBER,
+	USB_HID_LED_GENERIC_IND,
+	USB_HID_LED_SYSTEM_SUSPEND,
+	USB_HID_LED_EXTERNAL_POWER
+} usb_hid_usage_led_t;
+
+#endif /* LIBUSB_UTLED_H_ */
+/**
+ * @}
+ */
Index: uspace/lib/usbhid/src/hiddescriptor.c
===================================================================
--- uspace/lib/usbhid/src/hiddescriptor.c	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ uspace/lib/usbhid/src/hiddescriptor.c	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -33,5 +33,5 @@
  * HID report descriptor and report data parser implementation.
  */
-#include <usb/classes/hidparser.h>
+#include <usb/hid/hidparser.h>
 #include <errno.h>
 #include <stdio.h>
Index: uspace/lib/usbhid/src/hidiface.c
===================================================================
--- uspace/lib/usbhid/src/hidiface.c	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ uspace/lib/usbhid/src/hidiface.c	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -35,5 +35,5 @@
 #include <dev_iface.h>
 #include <usbhid_iface.h>
-#include <usb/classes/hid/iface.h>
+#include <usb/hid/iface.h>
 #include <errno.h>
 #include <str_error.h>
Index: uspace/lib/usbhid/src/hidparser.c
===================================================================
--- uspace/lib/usbhid/src/hidparser.c	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ uspace/lib/usbhid/src/hidparser.c	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -33,5 +33,5 @@
  * HID report descriptor and report data parser implementation.
  */
-#include <usb/classes/hidparser.h>
+#include <usb/hid/hidparser.h>
 #include <errno.h>
 #include <stdio.h>
Index: uspace/lib/usbhid/src/hidpath.c
===================================================================
--- uspace/lib/usbhid/src/hidpath.c	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ uspace/lib/usbhid/src/hidpath.c	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -33,5 +33,5 @@
  * HID report descriptor and report data parser implementation.
  */
-#include <usb/classes/hidparser.h>
+#include <usb/hid/hidparser.h>
 #include <errno.h>
 #include <stdio.h>
Index: uspace/lib/usbhid/src/hidreport.c
===================================================================
--- uspace/lib/usbhid/src/hidreport.c	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ uspace/lib/usbhid/src/hidreport.c	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -40,13 +40,13 @@
 
 #include <usb/debug.h>
-#include <usb/classes/hidparser.h>
+#include <usb/hid/hidparser.h>
 #include <usb/dev/dp.h>
 #include <usb/dev/driver.h>
 #include <usb/dev/pipes.h>
-#include <usb/classes/hid.h>
+#include <usb/hid/hid.h>
 #include <usb/descriptor.h>
 #include <usb/dev/request.h>
 
-#include <usb/classes/hidreport.h>
+#include <usb/hid/hidreport.h>
 
 static int usb_hid_get_report_descriptor(usb_device_t *dev, 
Index: uspace/lib/usbhid/src/hidreq.c
===================================================================
--- uspace/lib/usbhid/src/hidreq.c	(revision 9f2de9253acdd441e502bbbb86a6091c8d9d30a2)
+++ uspace/lib/usbhid/src/hidreq.c	(revision faa44e5822a62f097605f7e1a86f8019bcb3872e)
@@ -38,10 +38,10 @@
 #include <str_error.h>
 
-#include <usb/classes/hid.h>
+#include <usb/hid/hid.h>
 #include <usb/debug.h>
 #include <usb/dev/request.h>
 #include <usb/dev/pipes.h>
 
-#include <usb/classes/hidreq.h>
+#include <usb/hid/request.h>
 
 /*----------------------------------------------------------------------------*/
