Changeset d972534 in mainline for uspace/lib
- Timestamp:
- 2011-02-24T23:32:04Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 54e682f
- Parents:
- f2ba5d9f
- Location:
- uspace/lib/usb
- Files:
-
- 3 edited
-
include/usb/classes/hid.h (modified) (1 diff)
-
include/usb/classes/hidparser.h (modified) (2 diffs)
-
src/hidparser.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/classes/hid.h
rf2ba5d9f rd972534 50 50 USB_HIDREQ_SET_PROTOCOL = 11 51 51 } usb_hid_request_t; 52 53 typedef enum { 54 USB_HID_REPORT_TYPE_INPUT = 1, 55 USB_HID_REPORT_TYPE_OUTPUT = 2, 56 USB_HID_REPORT_TYPE_FEATURE = 3 57 } usb_hid_report_type_t; 52 58 53 59 /** USB/HID subclass constants. */ -
uspace/lib/usb/include/usb/classes/hidparser.h
rf2ba5d9f rd972534 83 83 } usb_hid_modifiers_t; 84 84 85 typedef enum { 86 USB_HID_LED_NUM_LOCK = 0x1, 87 USB_HID_LED_CAPS_LOCK = 0x2, 88 USB_HID_LED_SCROLL_LOCK = 0x4, 89 USB_HID_LED_COMPOSE = 0x8, 90 USB_HID_LED_KANA = 0x10, 91 USB_HID_LED_COUNT = 5 92 } usb_hid_led_t; 93 85 94 static const usb_hid_modifiers_t 86 95 usb_hid_modifiers_consts[USB_HID_MOD_COUNT] = { … … 94 103 USB_HID_MOD_RGUI 95 104 }; 105 106 //static const usb_hid_led_t usb_hid_led_consts[USB_HID_LED_COUNT] = { 107 // USB_HID_LED_NUM_LOCK, 108 // USB_HID_LED_CAPS_LOCK, 109 // USB_HID_LED_SCROLL_LOCK, 110 // USB_HID_LED_COMPOSE, 111 // USB_HID_LED_KANA 112 //}; 96 113 97 114 //#define USB_HID_BOOT_KEYBOARD_NUM_LOCK 0x01 -
uspace/lib/usb/src/hidparser.c
rf2ba5d9f rd972534 144 144 int usb_hid_boot_keyboard_output_report(uint8_t leds, uint8_t *data, size_t size) 145 145 { 146 if(size != 1){146 if(size < 2){ 147 147 return -1; 148 148 } 149 149 150 /* used only first five bits, others are only padding*/ 151 *data = leds; 150 data[1] = leds; 152 151 return EOK; 153 152 }
Note:
See TracChangeset
for help on using the changeset viewer.
