Changeset b8100da in mainline for uspace/lib/usb/devreq.h


Ignore:
Timestamp:
2010-10-10T17:01:40Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6c1315b
Parents:
b371844
Message:

Virtual USB device in separate library

The `usbvirt' library is intended to be a framework for creating
virtual USB devices.

So far, only the skeleton is ready.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/devreq.h

    rb371844 rb8100da  
    3131 */
    3232/** @file
    33  * @brief Virtual USB device.
     33 * @brief Standard USB device requests.
    3434 */
    35 #ifndef LIBUSB_VIRTDEV_H_
    36 #define LIBUSB_VIRTDEV_H_
     35#ifndef LIBUSB_DEVREQ_H_
     36#define LIBUSB_DEVREQ_H_
    3737
    3838#include <ipc/ipc.h>
    3939#include <async.h>
    40 #include "hcd.h"
    4140
    42 #define USB_VIRTDEV_KEYBOARD_ID 1
    43 #define USB_VIRTDEV_KEYBOARD_ADDRESS 1
     41/** Standard device request. */
     42typedef enum {
     43        USB_DEVREQ_GET_STATUS = 0,
     44        USB_DEVREQ_CLEAR_FEATURE = 1,
     45        USB_DEVREQ_SET_FEATURE = 3,
     46        USB_DEVREQ_SET_ADDRESS = 5,
     47        USB_DEVREQ_GET_DESCRIPTOR = 6,
     48        USB_DEVREQ_SET_DESCRIPTOR = 7,
     49        USB_DEVREQ_GET_CONFIGURATION = 8,
     50        USB_DEVREQ_SET_CONFIGURATION = 9,
     51        USB_DEVREQ_GET_INTERFACE = 10,
     52        USB_DEVREQ_SET_INTERFACE = 11,
     53        USB_DEVREQ_SYNCH_FRAME = 12
     54} usb_stddevreq_t;
    4455
    45 typedef void (*usb_virtdev_on_data_from_host_t)(usb_endpoint_t, void *, size_t);
    4656
    47 int usb_virtdev_connect(const char *, int, usb_virtdev_on_data_from_host_t);
    48 int usb_virtdev_data_to_host(int, usb_endpoint_t,
    49     void *, size_t);
    50 
    51 typedef enum {
    52         IPC_M_USB_VIRTDEV_DATA_TO_DEVICE = IPC_FIRST_USER_METHOD,
    53         IPC_M_USB_VIRTDEV_DATA_FROM_DEVICE
    54 } usb_virtdev_method_t;
    5557
    5658#endif
Note: See TracChangeset for help on using the changeset viewer.