Changeset ca07cd3 in mainline for uspace/lib/usbvirt/hub.h


Ignore:
Timestamp:
2010-10-25T13:23:33Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
23cb44b
Parents:
355f7c2
Message:

Code cleanup, various bugfixes

The internal functions of virtual device framework always get
device structure as parameter, thus possible enabling more devices
within single task (that is not possible because currently there
is no way to pass extra argument into callback_connection()).

Also, added some missing comments and completely removed the device
id nonsense (devices can send their descriptors and the hub is able
to enable/disable its ports).

File:
1 edited

Legend:

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

    r355f7c2 rca07cd3  
    3838#include "device.h"
    3939
     40/** USB transaction type.
     41 * This types does not correspond directly to types in USB specification,
     42 * as actually DATA transactions are marked with these types to identify
     43 * their direction (and tag).
     44 */
     45typedef enum {
     46        USBVIRT_TRANSACTION_SETUP,
     47        USBVIRT_TRANSACTION_IN,
     48        USBVIRT_TRANSACTION_OUT
     49} usbvirt_transaction_type_t;
    4050
     51const char *usbvirt_str_transaction_type(usbvirt_transaction_type_t type);
     52
     53/** Telephony methods of virtual devices. */
    4154typedef enum {
    42         IPC_M_USBVIRT_DATA_TO_DEVICE = IPC_FIRST_USER_METHOD,
    43         IPC_M_USBVIRT_DATA_FROM_DEVICE,
     55        IPC_M_USBVIRT_GET_NAME = IPC_FIRST_USER_METHOD,
    4456        IPC_M_USBVIRT_TRANSACTION_SETUP,
    4557        IPC_M_USBVIRT_TRANSACTION_OUT,
     
    4860
    4961int usbvirt_connect(usbvirt_device_t *, const char *);
    50 int usbvirt_disconnect(void);
    5162int usbvirt_connect_local(usbvirt_device_t *);
     63int usbvirt_disconnect(usbvirt_device_t *dev);
    5264
    5365#endif
Note: See TracChangeset for help on using the changeset viewer.