Changeset 3cdaa7f in mainline


Ignore:
Timestamp:
2018-01-20T02:02:37Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c280d7e
Parents:
5ff5dc5
Message:

libdrv: usb structures shall be part of the usbhc iface

Location:
uspace
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhub/usbhub.c

    r5ff5dc5 r3cdaa7f  
    5151#include <usb/classes/hub.h>
    5252#include <usb/dev/poll.h>
    53 #include <usb_iface.h>
     53#include <usbhc_iface.h>
    5454
    5555#include "usbhub.h"
  • uspace/lib/drv/include/usb_iface.h

    r5ff5dc5 r3cdaa7f  
    4343typedef async_sess_t usb_dev_session_t;
    4444
    45 /** USB speeds. */
    46 typedef enum {
    47         /** USB 1.1 low speed (1.5Mbits/s). */
    48         USB_SPEED_LOW,
    49         /** USB 1.1 full speed (12Mbits/s). */
    50         USB_SPEED_FULL,
    51         /** USB 2.0 high speed (480Mbits/s). */
    52         USB_SPEED_HIGH,
    53         /** USB 3.0 super speed (5Gbits/s). */
    54         USB_SPEED_SUPER,
    55         /** Psuedo-speed serving as a boundary. */
    56         USB_SPEED_MAX
    57 } usb_speed_t;
    58 
    59 /** USB endpoint number type.
    60  * Negative values could be used to indicate error.
    61  */
    62 typedef int16_t usb_endpoint_t;
    63 
    64 /** USB address type.
    65  * Negative values could be used to indicate error.
    66  */
    67 typedef int16_t usb_address_t;
    68 
    69 /** USB transfer type. */
    70 typedef enum {
    71         USB_TRANSFER_CONTROL = 0,
    72         USB_TRANSFER_ISOCHRONOUS = 1,
    73         USB_TRANSFER_BULK = 2,
    74         USB_TRANSFER_INTERRUPT = 3
    75 } usb_transfer_type_t;
    76 
    77 /** USB data transfer direction. */
    78 typedef enum {
    79         USB_DIRECTION_IN,
    80         USB_DIRECTION_OUT,
    81         USB_DIRECTION_BOTH
    82 } usb_direction_t;
    83 
    84 /** USB complete address type.
    85  * Pair address + endpoint is identification of transaction recipient.
    86  */
    87 typedef union {
    88         struct {
    89                 usb_address_t address;
    90                 usb_endpoint_t endpoint;
    91                 uint32_t stream;
    92         } __attribute__((packed));
    93         uint64_t packed;
    94 } usb_target_t;
    95 
    9645extern usb_dev_session_t *usb_dev_connect(devman_handle_t);
    9746extern usb_dev_session_t *usb_dev_connect_to_self(ddf_dev_t *);
  • uspace/lib/drv/include/usbhc_iface.h

    r5ff5dc5 r3cdaa7f  
    4141
    4242#include "ddf/driver.h"
    43 #include "usb_iface.h"
    4443#include <async.h>
     44
     45/** USB speeds. */
     46typedef enum {
     47        /** USB 1.1 low speed (1.5Mbits/s). */
     48        USB_SPEED_LOW,
     49        /** USB 1.1 full speed (12Mbits/s). */
     50        USB_SPEED_FULL,
     51        /** USB 2.0 high speed (480Mbits/s). */
     52        USB_SPEED_HIGH,
     53        /** USB 3.0 super speed (5Gbits/s). */
     54        USB_SPEED_SUPER,
     55        /** Psuedo-speed serving as a boundary. */
     56        USB_SPEED_MAX
     57} usb_speed_t;
     58
     59/** USB endpoint number type.
     60 * Negative values could be used to indicate error.
     61 */
     62typedef int16_t usb_endpoint_t;
     63
     64/** USB address type.
     65 * Negative values could be used to indicate error.
     66 */
     67typedef int16_t usb_address_t;
     68
     69/** USB transfer type. */
     70typedef enum {
     71        USB_TRANSFER_CONTROL = 0,
     72        USB_TRANSFER_ISOCHRONOUS = 1,
     73        USB_TRANSFER_BULK = 2,
     74        USB_TRANSFER_INTERRUPT = 3
     75} usb_transfer_type_t;
     76
     77/** USB data transfer direction. */
     78typedef enum {
     79        USB_DIRECTION_IN,
     80        USB_DIRECTION_OUT,
     81        USB_DIRECTION_BOTH
     82} usb_direction_t;
     83
     84/** USB complete address type.
     85 * Pair address + endpoint is identification of transaction recipient.
     86 */
     87typedef union {
     88        struct {
     89                usb_address_t address;
     90                usb_endpoint_t endpoint;
     91                uint32_t stream;
     92        } __attribute__((packed));
     93        uint64_t packed;
     94} usb_target_t;
    4595
    4696typedef struct usb_pipe_desc {
  • uspace/lib/usb/include/usb/usb.h

    r5ff5dc5 r3cdaa7f  
    3939#include <stdint.h>
    4040#include <types/common.h>
    41 #include <usb_iface.h>
     41#include <usbhc_iface.h>
    4242
    4343/** Convert 16bit value from native (host) endianness to USB endianness. */
  • uspace/lib/usbdev/include/usb/dev/pipes.h

    r5ff5dc5 r3cdaa7f  
    3737#include <usb/usb.h>
    3838#include <usb/descriptor.h>
    39 #include <usbhc_iface.h>
     39#include <usb_iface.h>
    4040
    4141#include <stdbool.h>
  • uspace/lib/usbdev/src/pipes.c

    r5ff5dc5 r3cdaa7f  
    3636#include <usb/dev/request.h>
    3737#include <usb/usb.h>
    38 #include <usbhc_iface.h>
    3938
    4039#include <assert.h>
Note: See TracChangeset for help on using the changeset viewer.