Changeset f8e8738 in mainline for uspace/drv/ohci/iface.c


Ignore:
Timestamp:
2011-04-07T20:22:40Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fee6381
Parents:
61257f4 (diff), a82889e (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:

Changes from development

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/iface.c

    r61257f4 rf8e8738  
    151151    size_t max_packet_size, unsigned int interval)
    152152{
    153         UNSUPPORTED("register_endpoint");
    154 
    155         return ENOTSUP;
     153        assert(fun);
     154        hc_t *hc = fun_to_hc(fun);
     155        assert(hc);
     156        if (address == hc->rh.address)
     157                return EOK;
     158        const usb_speed_t speed =
     159                usb_device_keeper_get_speed(&hc->manager, address);
     160        const size_t size = max_packet_size;
     161        usb_log_debug("Register endpoint %d:%d %s %s(%d) %zu(%zu) %u.\n",
     162            address, endpoint, usb_str_transfer_type(transfer_type),
     163            usb_str_speed(speed), direction, size, max_packet_size, interval);
     164        // TODO use real endpoint here!
     165        return usb_endpoint_manager_register_ep(&hc->ep_manager,NULL, 0);
    156166}
    157167/*----------------------------------------------------------------------------*/
     
    168178    usb_endpoint_t endpoint, usb_direction_t direction)
    169179{
    170         UNSUPPORTED("unregister_endpoint");
    171 
    172         return ENOTSUP;
     180        assert(fun);
     181        hc_t *hc = fun_to_hc(fun);
     182        assert(hc);
     183        usb_log_debug("Unregister endpoint %d:%d %d.\n",
     184            address, endpoint, direction);
     185        return usb_endpoint_manager_unregister_ep(&hc->ep_manager, address,
     186            endpoint, direction);
    173187}
    174188/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.