Changeset 7fc092a in mainline for uspace/lib/usb/include/usb/classes/hidparser.h
- Timestamp:
- 2011-01-27T22:09:29Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- db7ed07
- Parents:
- 9ee87f6 (diff), 6265a2b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/classes/hidparser.h
r9ee87f6 r7fc092a 27 27 */ 28 28 29 /** @addtogroup libusb usb29 /** @addtogroup libusb 30 30 * @{ 31 31 */ … … 38 38 #include <stdint.h> 39 39 40 /** 41 * Description of report items 42 */ 43 typedef struct { 44 45 uint8_t usage_min; 46 uint8_t usage_max; 47 uint8_t logical_min; 48 uint8_t logical_max; 49 uint8_t size; 50 uint8_t count; 51 uint8_t offset; 52 53 } usb_hid_report_item_t; 54 55 40 56 /** HID report parser structure. */ 41 57 typedef struct { 42 58 } usb_hid_report_parser_t; 59 43 60 44 61 /** HID parser callbacks for IN items. */ … … 50 67 * @param arg Custom argument. 51 68 */ 52 void (*keyboard)(const uint 16_t *key_codes, size_t count, void *arg);69 void (*keyboard)(const uint8_t *key_codes, size_t count, const uint8_t modifiers, void *arg); 53 70 } usb_hid_report_in_callbacks_t; 71 72 #define USB_HID_BOOT_KEYBOARD_NUM_LOCK 0x01 73 #define USB_HID_BOOT_KEYBOARD_CAPS_LOCK 0x02 74 #define USB_HID_BOOT_KEYBOARD_SCROLL_LOCK 0x04 75 #define USB_HID_BOOT_KEYBOARD_COMPOSE 0x08 76 #define USB_HID_BOOT_KEYBOARD_KANA 0x10 77 78 /* 79 * modifiers definitions 80 */ 81 82 int usb_hid_boot_keyboard_input_report(const uint8_t *data, size_t size, 83 const usb_hid_report_in_callbacks_t *callbacks, void *arg); 84 85 int usb_hid_boot_keyboard_output_report(uint8_t leds, uint8_t *data, size_t size); 54 86 55 87 int usb_hid_parse_report_descriptor(usb_hid_report_parser_t *parser, … … 60 92 const usb_hid_report_in_callbacks_t *callbacks, void *arg); 61 93 94 95 int usb_hid_free_report_parser(usb_hid_report_parser_t *parser); 96 62 97 #endif 63 98 /**
Note:
See TracChangeset
for help on using the changeset viewer.