Changeset 8c877b2 in mainline for uspace/drv/usbhid/hiddev.h


Ignore:
Timestamp:
2011-03-04T13:05:35Z (14 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d49728c
Parents:
dff940f8 (diff), 9a422574 (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 with \usb\development

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/hiddev.h

    rdff940f8 r8c877b2  
    3131 */
    3232/** @file
    33  * Common definitions.
     33 * Generic USB HID device structure and API.
    3434 */
    3535
    36 #ifndef USBHID_HID_H_
    37 #define USBHID_HID_H_
     36#ifndef USBHID_HIDDEV_H_
     37#define USBHID_HIDDEV_H_
     38
     39#include <stdint.h>
     40
     41#include <ddf/driver.h>
    3842
    3943#include <usb/classes/hid.h>
    40 #include <ddf/driver.h>
    4144#include <usb/pipes.h>
     45#include <usb/classes/hidparser.h>
     46
     47/*----------------------------------------------------------------------------*/
    4248
    4349/**
    44  *
    45  */
    46 typedef struct {
    47         usb_standard_interface_descriptor_t iface_desc;
    48         usb_standard_endpoint_descriptor_t *endpoints;
    49         usb_standard_hid_descriptor_t hid_desc;
    50         uint8_t *report_desc;
    51         //usb_standard_hid_class_descriptor_info_t *class_desc_info;
    52         //uint8_t **class_descs;
    53 } usb_hid_iface_t;
    54 
    55 /**
    56  *
    57  */
    58 typedef struct {
    59         usb_standard_configuration_descriptor_t config_descriptor;
    60         usb_hid_iface_t *interfaces;
    61 } usb_hid_configuration_t;
    62 
    63 /**
    64  * @brief USB/HID keyboard device type.
    65  *
    66  * Quite dummy right now.
     50 * @brief USB/HID device type.
    6751 */
    6852typedef struct {
    6953        ddf_dev_t *device;
    70         usb_hid_configuration_t *conf;
    71         usb_hid_report_parser_t *parser;
    7254
    7355        usb_device_connection_t wire;
    7456        usb_endpoint_pipe_t ctrl_pipe;
    7557        usb_endpoint_pipe_t poll_pipe;
    76 } usb_hid_dev_kbd_t;
     58       
     59        uint16_t iface;
     60       
     61        uint8_t *report_desc;
     62        usb_hid_report_parser_t *parser;
     63       
     64        int initialized;
     65} usbhid_dev_t;
    7766
    78 // TODO: more configurations!
     67/*----------------------------------------------------------------------------*/
    7968
    80 #endif
     69usbhid_dev_t *usbhid_dev_new(void);
     70
     71void usbhid_dev_free(usbhid_dev_t **hid_dev);
     72
     73int usbhid_dev_init(usbhid_dev_t *hid_dev, ddf_dev_t *dev,
     74    usb_endpoint_description_t *poll_ep_desc);
     75
     76/*----------------------------------------------------------------------------*/
     77
     78#endif /* USBHID_HIDDEV_H_ */
     79
     80/**
     81 * @}
     82 */
Note: See TracChangeset for help on using the changeset viewer.