Changeset 9097c16a in mainline for uspace/drv/usbhid/hid.h


Ignore:
Timestamp:
2011-02-04T13:14:14Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9e7cdf8
Parents:
11797d5 (diff), ff244e6 (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:

Merged development

File:
1 moved

Legend:

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

    r11797d5 r9097c16a  
    11/*
    2  * Copyright (c) 2010 Vojtech Horky
     2 * Copyright (c) 2011 Lubos Slovak
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup usb
     29/** @addtogroup drvusbhid
    3030 * @{
    3131 */
    3232/** @file
    33  * @brief Debugging support.
     33 * Common definitions.
    3434 */
    35 #include <stdio.h>
    36 #include <ipc/ipc.h>
    37 #include <usb/debug.h>
    3835
    39 #include "vhcd.h"
     36#ifndef USBHID_HID_H_
     37#define USBHID_HID_H_
    4038
    41 
    42 /** Debug print informing of invalid call.
    43  */
    44 void dprintf_inval_call(int level, ipc_call_t call, sysarg_t phone_hash)
    45 {
    46         dprintf(level, "phone%#x: invalid call [%u (%u, %u, %u, %u, %u)]",
    47             phone_hash,
    48             IPC_GET_IMETHOD(call),
    49             IPC_GET_ARG1(call), IPC_GET_ARG2(call), IPC_GET_ARG3(call),
    50             IPC_GET_ARG4(call), IPC_GET_ARG5(call));
    51 }
     39#include <usb/classes/hid.h>
     40#include <driver.h>
     41#include <usb/pipes.h>
    5242
    5343/**
    54  * @}
     44 *
    5545 */
     46typedef 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 */
     58typedef 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.
     67 */
     68typedef struct {
     69        device_t *device;
     70        usb_hid_configuration_t *conf;
     71        usb_address_t address;
     72        usb_hid_report_parser_t *parser;
     73
     74        usb_device_connection_t wire;
     75        usb_endpoint_pipe_t poll_pipe;
     76} usb_hid_dev_kbd_t;
     77
     78// TODO: more configurations!
     79
     80#endif
Note: See TracChangeset for help on using the changeset viewer.