Index: uspace/lib/usb/include/usb/classes/hid/utled.h
===================================================================
--- uspace/lib/usb/include/usb/classes/hid/utled.h	(revision 0053fa389cb88e96dbd4e306a499a09779dcdfd3)
+++ uspace/lib/usb/include/usb/classes/hid/utled.h	(revision 0053fa389cb88e96dbd4e306a499a09779dcdfd3)
@@ -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/usb/include/usb/classes/hidparser.h
===================================================================
--- uspace/lib/usb/include/usb/classes/hidparser.h	(revision d773285ffe7dee46caac6fd3fb53c959abdcec05)
+++ uspace/lib/usb/include/usb/classes/hidparser.h	(revision 0053fa389cb88e96dbd4e306a499a09779dcdfd3)
@@ -31,5 +31,5 @@
  */
 /** @file
- * @brief USB HID parser.
+ * USB HID report descriptor and report data parser
  */
 #ifndef LIBUSB_HIDPARSER_H_
@@ -74,13 +74,20 @@
 #define USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY	4
 
+/** */
 typedef struct {
+	/** */
 	int32_t usage_page;
+	/** */	
 	int32_t usage;
-
+	/** */
 	link_t link;
 } usb_hid_report_usage_path_t;
 
+/** */
 typedef struct {
+	/** */	
 	int depth;	
+	
+	/** */	
 	link_t link;
 } usb_hid_report_path_t;
@@ -90,32 +97,50 @@
  */
 typedef struct {
+	/** */	
 	int32_t id;
+	/** */	
 	int32_t usage_minimum;
+	/** */	
 	int32_t usage_maximum;
+	/** */	
 	int32_t logical_minimum;
+	/** */	
 	int32_t logical_maximum;
+	/** */	
 	int32_t size;
+	/** */	
 	int32_t count;
+	/** */	
 	size_t offset;
+	/** */	
 	int32_t delimiter;
-
+	/** */	
 	int32_t unit_exponent;
+	/** */	
 	int32_t unit;
 
-	/*
-	 * some not yet used fields
-	 */
+	/** */
 	int32_t string_index;
+	/** */	
 	int32_t string_minimum;
+	/** */	
 	int32_t string_maximum;
+	/** */	
 	int32_t designator_index;
+	/** */	
 	int32_t designator_minimum;
+	/** */	
 	int32_t designator_maximum;
+	/** */	
 	int32_t physical_minimum;
+	/** */	
 	int32_t physical_maximum;
 
+	/** */	
 	uint8_t item_flags;
 
+	/** */	
 	usb_hid_report_path_t *usage_path;
+	/** */	
 	link_t link;
 } usb_hid_report_item_t;
@@ -124,6 +149,9 @@
 /** HID report parser structure. */
 typedef struct {	
+	/** */	
 	link_t input;
+	/** */	
 	link_t output;
+	/** */	
 	link_t feature;
 } usb_hid_report_parser_t;	
@@ -154,12 +182,12 @@
 } usb_hid_modifiers_t;
 
-typedef enum {
-	USB_HID_LED_NUM_LOCK = 0x1,
-	USB_HID_LED_CAPS_LOCK = 0x2,
-	USB_HID_LED_SCROLL_LOCK = 0x4,
-	USB_HID_LED_COMPOSE = 0x8,
-	USB_HID_LED_KANA = 0x10,
-	USB_HID_LED_COUNT = 5
-} usb_hid_led_t;
+//typedef enum {
+//	USB_HID_LED_NUM_LOCK = 0x1,
+//	USB_HID_LED_CAPS_LOCK = 0x2,
+//	USB_HID_LED_SCROLL_LOCK = 0x4,
+//	USB_HID_LED_COMPOSE = 0x8,
+//	USB_HID_LED_KANA = 0x10,
+//	USB_HID_LED_COUNT = 5
+//} usb_hid_led_t;
 
 static const usb_hid_modifiers_t 
@@ -190,16 +218,34 @@
 
 /*
- * modifiers definitions
- */
-
+ * Descriptor parser functions
+ */
+/** */
+int usb_hid_parser_init(usb_hid_report_parser_t *parser);
+
+/** */
+int usb_hid_parse_report_descriptor(usb_hid_report_parser_t *parser, 
+    const uint8_t *data, size_t size);
+
+/** */
+void usb_hid_free_report_parser(usb_hid_report_parser_t *parser);
+
+/** */
+void usb_hid_descriptor_print(usb_hid_report_parser_t *parser);
+
+/*
+ * Boot protocol functions
+ */
+/** */
 int usb_hid_boot_keyboard_input_report(const uint8_t *data, size_t size,
 	const usb_hid_report_in_callbacks_t *callbacks, void *arg);
 
+/** */
 int usb_hid_boot_keyboard_output_report(uint8_t leds, uint8_t *data, size_t size);
 
-int usb_hid_parser_init(usb_hid_report_parser_t *parser);
-int usb_hid_parse_report_descriptor(usb_hid_report_parser_t *parser, 
-    const uint8_t *data, size_t size);
-
+
+/*
+ * Input report parser functions
+ */
+/** */
 int usb_hid_parse_report(const usb_hid_report_parser_t *parser,  
     const uint8_t *data, size_t size,
@@ -207,28 +253,56 @@
     const usb_hid_report_in_callbacks_t *callbacks, void *arg);
 
-int usb_hid_report_input_length(const usb_hid_report_parser_t *parser,
+/** */
+size_t usb_hid_report_input_length(const usb_hid_report_parser_t *parser,
 	usb_hid_report_path_t *path, int flags);
 
 
-void usb_hid_free_report_parser(usb_hid_report_parser_t *parser);
-
-void usb_hid_descriptor_print(usb_hid_report_parser_t *parser);
-
-/* usage path functions */
+
+/* 
+ * usage path functions 
+ */
+/** */
 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_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);
-int	usb_hid_report_path_clone(usb_hid_report_path_t *new_usage_path, usb_hid_report_path_t *usage_path);
-
-
-// output
-//	- funkce co vrati cesty poli v output reportu
-//	- funkce co pro danou cestu nastavi data
-//	- finalize
-
+
+/** */
+usb_hid_report_path_t *usb_hid_report_path_clone(usb_hid_report_path_t *usage_path);
+
+
+/*
+ * Output report parser functions
+ */
+/** Allocates output report buffer*/
+uint8_t *usb_hid_report_output(usb_hid_report_parser_t *parser, size_t *size);
+
+/** 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_parser_t *parser,
+                                  usb_hid_report_path_t *path, int flags);
+
+/** Updates the output report buffer by translated given data */
+int usb_hid_report_output_translate(usb_hid_report_parser_t *parser,
+                                    usb_hid_report_path_t *path, int flags,
+                                    uint8_t *buffer, size_t size,
+                                    int32_t *data, size_t data_size);
 #endif
 /**
