Changeset 95622c4 in mainline for uspace/drv/vhc


Ignore:
Timestamp:
2011-01-28T10:19:29Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
679a135
Parents:
9f0318c
Message:

Add standalone virtual hub

Similar to virtual USB keyboard (vuk'), vuh' is a virtual USB hub.

Location:
uspace/drv/vhc/hub
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/vhc/hub/hub.h

    r9f0318c r95622c4  
    3838#include <fibril_synch.h>
    3939
     40#ifndef HUB_PORT_COUNT
    4041#define HUB_PORT_COUNT 2
     42#endif
    4143#define BITS2BYTES(bits) (bits ? ((((bits)-1)>>3)+1) : 0)
    4244
  • uspace/drv/vhc/hub/virthub.c

    r9f0318c r95622c4  
    164164        dev->device_data = hub;
    165165
    166         usbvirt_connect_local(dev);
    167 
    168         return EOK;
     166        int rc;
     167#ifdef STANDALONE_HUB
     168        dev->name = "hub";
     169        rc = usbvirt_connect(dev);
     170#else
     171        rc = usbvirt_connect_local(dev);
     172#endif
     173
     174        return rc;
    169175}
    170176
  • uspace/drv/vhc/hub/virthub.h

    r9f0318c r95622c4  
    3737
    3838#include <usbvirt/device.h>
     39#include "hub.h"
     40
     41#ifdef STANDALONE_HUB
     42#define virtdev_connection_t int
     43#else
    3944#include "../devices.h"
    40 #include "hub.h"
     45#endif
    4146
    4247/** Endpoint number for status change pipe. */
Note: See TracChangeset for help on using the changeset viewer.