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

Changeset 48fa501 in mainline


Ignore:
Timestamp:
2013-01-27T19:16:53Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
4c86c7c
Parents:
11e9e613
Message:

usb: Remove old endpoint management code.

Location:
uspace/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/hc.h

    r11e9e613 r48fa501  
    8787    devman_handle_t *);
    8888
    89 int usb_hc_register_endpoint(usb_hc_connection_t *, usb_address_t,
    90     usb_endpoint_t, usb_transfer_type_t, usb_direction_t, size_t, unsigned int);
    91 int usb_hc_unregister_endpoint(usb_hc_connection_t *, usb_address_t,
    92     usb_endpoint_t, usb_direction_t);
    93 
    9489int usb_hc_read(usb_hc_connection_t *, usb_address_t, usb_endpoint_t,
    9590    uint64_t, void *, size_t, size_t *);
  • uspace/lib/usb/src/hc.c

    r11e9e613 r48fa501  
    164164}
    165165
    166 int usb_hc_register_endpoint(usb_hc_connection_t *connection,
    167     usb_address_t address, usb_endpoint_t endpoint, usb_transfer_type_t type,
    168     usb_direction_t direction, size_t packet_size, unsigned interval)
    169 {
    170         async_exch_t *exch;
    171         EXCH_INIT(connection, exch);
    172 
    173         const int ret = usbhc_register_endpoint(exch, address, endpoint,
    174             type, direction, packet_size, interval);
    175 
    176         EXCH_FINI(connection, exch);
    177         return ret;
    178 }
    179 
    180 int usb_hc_unregister_endpoint(usb_hc_connection_t *connection,
    181     usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction)
    182 {
    183         async_exch_t *exch;
    184         EXCH_INIT(connection, exch);
    185 
    186         const int ret =
    187             usbhc_unregister_endpoint(exch, address, endpoint, direction);
    188 
    189         EXCH_FINI(connection, exch);
    190         return ret;
    191 }
    192 
    193166int usb_hc_read(usb_hc_connection_t *connection, usb_address_t address,
    194167    usb_endpoint_t endpoint, uint64_t setup, void *data, size_t size,
  • uspace/lib/usbdev/include/usb/dev/usb_device_connection.h

    r11e9e613 r48fa501  
    7373}
    7474
    75 /** Register endpoint on the device.
    76  * @param instance device connection structure to use.
    77  * @param ep USB endpoint number.
    78  * @param type Communication type of the endpoint.
    79  * @param direction Communication direction.
    80  * @param packet_size Maximum packet size for the endpoint.
    81  * @param interval Preferrred interval between communication.
    82  * @return Error code.
    83  */
    84 static inline int usb_device_register_endpoint(
    85     usb_device_connection_t *instance, usb_endpoint_t ep,
    86     usb_transfer_type_t type, usb_direction_t direction,
    87     size_t packet_size, unsigned interval)
    88 {
    89         assert(instance);
    90         return usb_hc_register_endpoint(instance->hc_connection,
    91             instance->address, ep, type, direction, packet_size, interval);
    92 }
    93 
    94 /** Unregister endpoint on the device.
    95  * @param instance device connection structure
    96  * @param ep Endpoint number.
    97  * @param dir Communication direction.
    98  * @return Error code.
    99  */
    100 static inline int usb_device_unregister_endpoint(
    101     usb_device_connection_t *instance, usb_endpoint_t ep, usb_direction_t dir)
    102 {
    103         assert(instance);
    104         return usb_hc_unregister_endpoint(instance->hc_connection,
    105             instance->address, ep, dir);
    106 }
    10775
    10876/** Get data from the device.
Note: See TracChangeset for help on using the changeset viewer.