Ignore:
Timestamp:
2010-10-15T16:32:57Z (15 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/srv/hw/bus/usb/hcd/virtual/hc.h

    r73301a0 r47e3a8e  
    4848    usb_transaction_outcome_t outcome, void *arg);
    4949
     50/** Pending transaction details. */
     51typedef struct {
     52        /** Linked-list link. */
     53        link_t link;
     54        /** Device address. */
     55        usb_target_t target;
     56        /** Direction of the transaction. */
     57        usb_direction_t direction;
     58        /** Transfer type. */
     59        usb_transfer_type_t type;
     60        /** Transaction data buffer. */
     61        void * buffer;
     62        /** Transaction data length. */
     63        size_t len;
     64        /** Callback after transaction is done. */
     65        hc_transaction_done_callback_t callback;
     66        /** Argument to the callback. */
     67        void * callback_arg;
     68} transaction_t;
     69
    5070void hc_manager(void);
    5171
Note: See TracChangeset for help on using the changeset viewer.