Changeset d972534 in mainline for uspace/lib/usb/include


Ignore:
Timestamp:
2011-02-24T23:32:04Z (15 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
54e682f
Parents:
f2ba5d9f
Message:

LED setting

  • LEDs are determined from remembered modifiers (not good, as that doesn't work well).
  • Added function for sending a Set_Report(Output) request (specific, have to make it generic later).
  • Added a lot of debug output.
  • Added HID Report Type constants to libusb (hid.h).
  • Added constants for LEDs (hidparser.h).
  • Modified function for composing output reports in hidparser.
Location:
uspace/lib/usb/include/usb/classes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/classes/hid.h

    rf2ba5d9f rd972534  
    5050        USB_HIDREQ_SET_PROTOCOL = 11
    5151} usb_hid_request_t;
     52
     53typedef 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;
    5258
    5359/** USB/HID subclass constants. */
  • uspace/lib/usb/include/usb/classes/hidparser.h

    rf2ba5d9f rd972534  
    8383} usb_hid_modifiers_t;
    8484
     85typedef 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
    8594static const usb_hid_modifiers_t
    8695    usb_hid_modifiers_consts[USB_HID_MOD_COUNT] = {
     
    94103        USB_HID_MOD_RGUI
    95104};
     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//};
    96113
    97114//#define USB_HID_BOOT_KEYBOARD_NUM_LOCK                0x01
Note: See TracChangeset for help on using the changeset viewer.