Changeset 243cb86 in mainline for uspace/lib/usb/src/hcdrv.c


Ignore:
Timestamp:
2010-12-12T10:50:19Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
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/lib/usb/src/hcdrv.c

    r101ef25c r243cb86  
    4747LIST_INITIALIZE(hc_list);
    4848
     49/* Fake driver to have the name item initialized. */
     50static usb_hc_driver_t hc_driver_fake = {
     51        .name = "HCD",
     52};
     53
    4954/** Our HC driver. */
    50 usb_hc_driver_t *hc_driver = NULL;
     55usb_hc_driver_t *hc_driver = &hc_driver_fake;
     56
     57int usb_lowest_address = 1;
     58
     59int usb_highest_address = 255;
    5160
    5261static device_ops_t usb_device_ops = {
    5362        .interfaces[USBHC_DEV_IFACE] = &usbhc_interface
    5463};
     64
     65
     66void usb_create_address_list(usb_hc_device_t * hcd){
     67        list_initialize(&hcd->addresses);
     68        usb_address_list_t * range =
     69                        (usb_address_list_t*)malloc(sizeof(usb_address_list_t));
     70        range->lower_bound = usb_lowest_address;
     71        range->upper_bound = usb_highest_address + 1;
     72        list_append(&range->link, &hcd->addresses);
     73}
    5574
    5675static usb_hc_device_t *usb_hc_device_create(device_t *dev) {
     
    5978        list_initialize(&hc_dev->link);
    6079        list_initialize(&hc_dev->hubs);
     80        usb_create_address_list(hc_dev);
    6181        list_initialize(&hc_dev->attached_devices);
    6282        hc_dev->transfer_ops = NULL;
     
    7191int usb_add_hc_device(device_t *dev)
    7292{
     93        return ENOTSUP;
    7394        usb_hc_device_t *hc_dev = usb_hc_device_create(dev);
    7495
Note: See TracChangeset for help on using the changeset viewer.