Ignore:
Timestamp:
2011-01-14T14:23:33Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b65ca41d
Parents:
f40a1e2 (diff), 2f60e57d (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.
Message:

merge from usb/development

File:
1 edited

Legend:

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

    rf40a1e2 r7a725b13  
    3838#include <stdint.h>
    3939
     40/**
     41 * Description of report items
     42 */
     43typedef 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
    4056/** HID report parser structure. */
    4157typedef struct {
    4258} usb_hid_report_parser_t;
     59
    4360
    4461/** HID parser callbacks for IN items. */
     
    5067         * @param arg Custom argument.
    5168         */
    52         void (*keyboard)(const uint16_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);
    5370} 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
     82int 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
     85int usb_hid_boot_keyboard_output_report(uint8_t leds, uint8_t *data, size_t size);
    5486
    5587int usb_hid_parse_report_descriptor(usb_hid_report_parser_t *parser,
     
    6092    const usb_hid_report_in_callbacks_t *callbacks, void *arg);
    6193
     94
     95int usb_hid_free_report_parser(usb_hid_report_parser_t *parser);
     96
    6297#endif
    6398/**
Note: See TracChangeset for help on using the changeset viewer.