Changeset 47e3a8e in mainline for uspace/lib/usbvirt/device.h


Ignore:
Timestamp:
2010-10-15T16:32:57Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
186d630
Parents:
73301a0
Message:

Virtual USB device tracks its address

Now, each virtual device tracks its address and its state.

The virtual HC dispatches all transactions to all devices, thus
more precisely simulating situation on USB. The usbvirt framework
then decides whether it can accept the data or not, based on
their destination address.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbvirt/device.h

    r73301a0 r47e3a8e  
    106106} usbvirt_descriptors_t;
    107107
     108/** Possible states of virtual USB device.
     109 * Notice that these are not 1:1 mappings to those in USB specification.
     110 */
     111typedef enum {
     112        USBVIRT_STATE_DEFAULT,
     113        USBVIRT_STATE_ADDRESS,
     114        USBVIRT_STATE_CONFIGURED
     115} usbvirt_device_state_t;
    108116
     117/** Virtual USB device. */
    109118typedef struct usbvirt_device {
    110119        /** Callback device operations. */
     
    126135        usbvirt_descriptors_t *descriptors;
    127136       
     137        /** Current device state. */
     138        usbvirt_device_state_t state;
     139        /** Device address. */
     140        usb_address_t address;
    128141       
    129142        /* Private attributes. */
Note: See TracChangeset for help on using the changeset viewer.