Changeset 0d92638 in mainline for uspace/drv/usbkbd/kbddev.c
- Timestamp:
- 2011-03-24T23:26:20Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1cbfd6b, a8ac368
- Parents:
- 252e30c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbkbd/kbddev.c
r252e30c r0d92638 112 112 113 113 enum { 114 BOOT_REPORT_DESCRIPTOR_SIZE = 0114 BOOT_REPORT_DESCRIPTOR_SIZE = 63 115 115 }; 116 116 117 static const uint8_t BOOT_REPORT_DESCRIPTOR[BOOT_REPORT_DESCRIPTOR_SIZE] = {}; 117 static const uint8_t BOOT_REPORT_DESCRIPTOR[BOOT_REPORT_DESCRIPTOR_SIZE] = { 118 0x05, 0x01, // Usage Page (Generic Desktop), 119 0x09, 0x06, // Usage (Keyboard), 120 0xA1, 0x01, // Collection (Application), 121 0x75, 0x01, // Report Size (1), 122 0x95, 0x08, // Report Count (8), 123 0x05, 0x07, // Usage Page (Key Codes); 124 0x19, 0xE0, // Usage Minimum (224), 125 0x29, 0xE7, // Usage Maximum (231), 126 0x15, 0x00, // Logical Minimum (0), 127 0x25, 0x01, // Logical Maximum (1), 128 0x81, 0x02, // Input (Data, Variable, Absolute), ; Modifier byte 129 0x95, 0x01, // Report Count (1), 130 0x75, 0x08, // Report Size (8), 131 0x81, 0x01, // Input (Constant), ; Reserved byte 132 0x95, 0x05, // Report Count (5), 133 0x75, 0x01, // Report Size (1), 134 0x05, 0x08, // Usage Page (Page# for LEDs), 135 0x19, 0x01, // Usage Minimum (1), 136 0x29, 0x05, // Usage Maxmimum (5), 137 0x91, 0x02, // Output (Data, Variable, Absolute), ; LED report 138 0x95, 0x01, // Report Count (1), 139 0x75, 0x03, // Report Size (3), 140 0x91, 0x01, // Output (Constant), ; LED report padding 141 0x95, 0x06, // Report Count (6), 142 0x75, 0x08, // Report Size (8), 143 0x15, 0x00, // Logical Minimum (0), 144 0x25, 0xff, // Logical Maximum (255), 145 0x05, 0x07, // Usage Page (Key Codes), 146 0x19, 0x00, // Usage Minimum (0), 147 0x29, 0xff, // Usage Maximum (255), 148 0x81, 0x00, // Input (Data, Array), ; Key arrays (6 bytes) 149 0xC0 // End Collection 150 151 }; 118 152 119 153 /*----------------------------------------------------------------------------*/ … … 669 703 } 670 704 671 //rc = usbhid_dev_init(kbd_dev->hid_dev, dev, &poll_endpoint_description); 672 673 674 // if (rc != EOK) { 675 // usb_log_error("Failed to initialize HID device structure: %s\n", 676 // str_error(rc)); 677 // return rc; 678 // } 679 680 // assert(kbd_dev->hid_dev->initialized == USB_KBD_STATUS_INITIALIZED); 681 682 // save the size of the report (boot protocol report by default) 683 // kbd_dev->key_count = BOOTP_REPORT_SIZE; 705 /* TODO: does not work! */ 706 if (dev->pipes[USB_KBD_POLL_EP_NO].interface_no < 0) { 707 usb_log_warning("Required endpoint not found - probably not " 708 "a supported device.\n"); 709 return ENOTSUP; 710 } 684 711 685 712 /* The USB device should already be initialized, save it in structure */
Note:
See TracChangeset
for help on using the changeset viewer.