Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 243cb86 in mainline for uspace/drv/vhc/hcd.c


Ignore:
Timestamp:
2010-12-12T10:50:19Z (11 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master
Children:
8365533
Parents:
101ef25c (diff), ebb98c5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from development + several changes to hid driver.

Changes to hid driver:

  • copied some code to usbkbd_get_descriptors() function
  • base structure for hid descriptor and report parser (files uspace/lib/usb/include/usb/classes/hidparser.h

and uspace/lib/usb/src/hidparser.c)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/vhc/hcd.c

    r101ef25c r243cb86  
    5252#include "conn.h"
    5353
     54static device_ops_t vhc_ops = {
     55        .interfaces[USBHC_DEV_IFACE] = &vhc_iface,
     56        .default_handler = default_connection_handler
     57};
    5458
    5559static int vhc_count = 0;
    56 static int vhc_add_device(usb_hc_device_t *dev)
     60static int vhc_add_device(device_t *dev)
    5761{
    5862        /*
     
    6569        vhc_count++;
    6670
    67         dev->transfer_ops = &vhc_transfer_ops;
    68         dev->generic->ops->default_handler = default_connection_handler;
     71        dev->ops = &vhc_ops;
     72
     73        /*
     74         * Initialize address management.
     75         */
     76        address_init();
    6977
    7078        /*
    7179         * Initialize our hub and announce its presence.
    7280         */
    73         hub_init();
    74         usb_hcd_add_root_hub(dev);
     81        hub_init(dev);
    7582
    7683        printf("%s: virtual USB host controller ready.\n", NAME);
     
    7986}
    8087
    81 static usb_hc_driver_t vhc_driver = {
     88static driver_ops_t vhc_driver_ops = {
     89        .add_device = vhc_add_device,
     90};
     91
     92static driver_t vhc_driver = {
    8293        .name = NAME,
    83         .add_hc = &vhc_add_device
     94        .driver_ops = &vhc_driver_ops
    8495};
    8596
     
    99110        printf("%s: virtual USB host controller driver.\n", NAME);
    100111
    101         debug_level = 10;
     112        usb_dprintf_enable(NAME, 10);
    102113
    103114        fid_t fid = fibril_create(hc_manager_fibril, NULL);
     
    114125        sleep(4);
    115126
    116         return usb_hcd_main(&vhc_driver);
     127        return driver_main(&vhc_driver);
    117128}
    118129
Note: See TracChangeset for help on using the changeset viewer.