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


Ignore:
Timestamp:
2010-12-12T13:49:35Z (15 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4c74ac3
Parents:
94c19b8 (diff), 0c05496 (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 into smekideki

Location:
uspace/lib/usb/include/usb
Files:
4 edited

Legend:

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

    r94c19b8 rb666608  
    6060} usb_class_t;
    6161
     62const char *usb_str_class(usb_class_t);
    6263
    6364#endif
  • uspace/lib/usb/include/usb/classes/hid.h

    r94c19b8 rb666608  
    3636#define LIBUSB_HID_H_
    3737
     38#include <usb/usb.h>
     39#include <driver.h>
     40#include <usb/classes/hidparser.h>
     41
    3842/** USB/HID device requests. */
    3943typedef enum {
     
    5458} usb_hid_protocol_t;
    5559
     60/** Part of standard USB HID descriptor specifying one class descriptor.
     61 *
     62 * (See HID Specification, p.22)
     63 */
     64typedef struct {
     65        /** Type of class descriptor (Report or Physical). */
     66        uint8_t class_descriptor_type;
     67        /** Length of class descriptor. */
     68        uint16_t class_descriptor_length;
     69} __attribute__ ((packed)) usb_standard_hid_descriptor_class_item_t;
     70
     71/** Standard USB HID descriptor.
     72 *
     73 * (See HID Specification, p.22)
     74 *
     75 * It is actually only the "header" of the descriptor, as it may have arbitrary
     76 * length if more than one class descritor is provided.
     77 */
     78typedef struct {
     79        /** Size of this descriptor in bytes. */
     80        uint8_t length;
     81        /** Descriptor type (USB_DESCTYPE_HID). */
     82        uint8_t descriptor_type;
     83        /** HID Class Specification release. */
     84        uint16_t spec_release;
     85        /** Country code of localized hardware. */
     86        uint8_t country_code;
     87        /** Total number of class (i.e. Report and Physical) descriptors. */
     88        uint8_t class_count;
     89        /** First mandatory class descriptor info. */
     90        usb_standard_hid_descriptor_class_item_t class_descriptor;
     91} __attribute__ ((packed)) usb_standard_hid_descriptor_t;
     92
     93
     94/**
     95 * @brief USB/HID keyboard device type.
     96 *
     97 * Quite dummy right now.
     98 */
     99typedef struct {
     100        device_t *device;
     101        usb_address_t address;
     102        usb_endpoint_t default_ep;
     103        usb_hid_report_parser_t *parser;
     104} usb_hid_dev_kbd_t;
     105
    56106#endif
    57107/**
  • uspace/lib/usb/include/usb/classes/hidparser.h

    r94c19b8 rb666608  
    5050         * @param arg Custom argument.
    5151         */
    52         void (*keyboard)(const uint32_t *key_codes, size_t count, void *arg);
     52        void (*keyboard)(const uint16_t *key_codes, size_t count, void *arg);
    5353} usb_hid_report_in_callbacks_t;
    5454
    5555int usb_hid_parse_report_descriptor(usb_hid_report_parser_t *parser,
    56     const uint8_t *data);
     56    const uint8_t *data, size_t size);
    5757
    5858int usb_hid_parse_report(const usb_hid_report_parser_t *parser, 
    59     const uint8_t *data,
     59    const uint8_t *data, size_t size,
    6060    const usb_hid_report_in_callbacks_t *callbacks, void *arg);
    6161
  • uspace/lib/usb/include/usb/usbdrv.h

    r94c19b8 rb666608  
    9494int usb_drv_async_wait_for(usb_handle_t);
    9595
     96int usb_drv_create_device_match_ids(int, match_id_list_t *, usb_address_t);
     97int usb_drv_register_child_in_devman(int, device_t *, usb_address_t,
     98    devman_handle_t *);
     99
    96100
    97101#endif
Note: See TracChangeset for help on using the changeset viewer.