Changeset 64fea02 in mainline


Ignore:
Timestamp:
2017-11-22T13:54:05Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
820d9bc
Parents:
b60eac1
Message:

usbhost: refactor include hiearchy

Location:
uspace
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/vhc/transfer.c

    rb60eac1 r64fea02  
    3232#include <usbvirt/device.h>
    3333#include <usb/host/bandwidth.h>
     34#include <usb/host/endpoint.h>
     35#include <usb/host/usb_transfer_batch.h>
    3436#include <usbvirt/ipc.h>
    3537#include "vhcd.h"
  • uspace/lib/usbhost/include/usb/host/bus.h

    rb60eac1 r64fea02  
    4545#include <usb/usb.h>
    4646#include <usb/request.h>
     47#include <usb/host/hcd.h>
    4748
    4849#include <assert.h>
  • uspace/lib/usbhost/include/usb/host/ddf_helpers.h

    rb60eac1 r64fea02  
    3737#define LIBUSBHOST_HOST_DDF_HELPERS_H
    3838
    39 #include <usb/host/hcd.h>
    40 #include <usb/host/bus.h>
    41 #include <usb/usb.h>
    42 
    4339#include <ddf/driver.h>
    4440#include <ddf/interrupt.h>
    4541#include <device/hw_res_parsed.h>
     42#include <usb/usb.h>
     43
     44#include <usb/host/hcd.h>
    4645
    4746typedef int (*driver_init_t)(hcd_t *, const hw_res_list_parsed_t *, ddf_dev_t *);
  • uspace/lib/usbhost/include/usb/host/endpoint.h

    rb60eac1 r64fea02  
    4040#define LIBUSBHOST_HOST_ENDPOINT_H
    4141
     42#include <adt/list.h>
     43#include <atomic.h>
     44#include <fibril_synch.h>
    4245#include <stdbool.h>
    43 #include <adt/list.h>
    44 #include <fibril_synch.h>
    4546#include <usb/usb.h>
    46 #include <atomic.h>
    4747
    4848typedef struct bus bus_t;
  • uspace/lib/usbhost/include/usb/host/hcd.h

    rb60eac1 r64fea02  
    3737#define LIBUSBHOST_HOST_HCD_H
    3838
    39 #include <usb/host/endpoint.h>
    40 #include <usb/host/bus.h>
    41 #include <usb/host/usb_transfer_batch.h>
    42 #include <usb/usb.h>
    43 
    4439#include <assert.h>
    4540#include <mem.h>
    4641#include <stddef.h>
    4742#include <stdint.h>
     43#include <usb/usb.h>
    4844#include <usbhc_iface.h>
    4945
    5046typedef struct hcd hcd_t;
     47typedef struct bus bus_t;
     48typedef struct device device_t;
     49typedef struct usb_transfer_batch usb_transfer_batch_t;
    5150
    5251typedef int (*schedule_hook_t)(hcd_t *, usb_transfer_batch_t *);
  • uspace/lib/usbhost/include/usb/host/usb2_bus.h

    rb60eac1 r64fea02  
    3737#define LIBUSBHOST_HOST_USB2_BUS_H
    3838
    39 #include <usb/usb.h>
    40 #include <usb/host/bus.h>
    41 
    4239#include <adt/list.h>
    4340#include <stdbool.h>
     41#include <usb/usb.h>
     42
     43#include <usb/host/bus.h>
    4444
    4545typedef struct usb2_bus usb2_bus_t;
  • uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h

    rb60eac1 r64fea02  
    3737#define LIBUSBHOST_HOST_USB_TRANSFER_BATCH_H
    3838
     39#include <atomic.h>
     40#include <errno.h>
     41#include <stddef.h>
     42#include <stdint.h>
     43#include <usb/request.h>
    3944#include <usb/usb.h>
    40 #include <usb/request.h>
    41 #include <usb/host/bus.h>
    4245#include <usbhc_iface.h>
    4346
    44 #include <atomic.h>
    45 #include <stddef.h>
    46 #include <errno.h>
    47 #include <stdint.h>
     47#include <usb/host/hcd.h>
     48#include <usb/host/endpoint.h>
     49#include <usb/host/bus.h>
    4850
    4951typedef struct endpoint endpoint_t;
     
    8789} usb_transfer_batch_t;
    8890
    89 /** Printf formatting string for dumping usb_transfer_batch_t. */
     91/**
     92 * Printf formatting string for dumping usb_transfer_batch_t.
     93 *  [address:endpoint speed transfer_type-direction buffer_sizeB/max_packet_size]
     94 * */
    9095#define USB_TRANSFER_BATCH_FMT "[%d:%d %s %s-%s %zuB/%zu]"
    9196
     
    9499 */
    95100#define USB_TRANSFER_BATCH_ARGS(batch) \
    96         (batch).target.address, (batch).target.endpoint, \
     101        ((batch).ep->device->address), ((batch).ep->endpoint), \
    97102        usb_str_speed((batch).ep->device->speed), \
    98103        usb_str_transfer_type_short((batch).ep->transfer_type), \
    99         usb_str_direction((batch).ep->direction), \
     104        usb_str_direction((batch).dir), \
    100105        (batch).buffer_size, (batch).ep->max_packet_size
    101106
  • uspace/lib/usbhost/src/bandwidth.c

    rb60eac1 r64fea02  
    3434 */
    3535
    36 #include <usb/host/bandwidth.h>
    37 #include <usb/host/endpoint.h>
    38 #include <usb/host/bus.h>
    39 
    4036#include <assert.h>
    4137#include <stdlib.h>
     38
     39#include "endpoint.h"
     40#include "bus.h"
     41
     42#include "bandwidth.h"
    4243
    4344/** Calculate bandwidth that needs to be reserved for communication with EP.
  • uspace/lib/usbhost/src/bus.c

    rb60eac1 r64fea02  
    3434 */
    3535
    36 #include <usb/host/bus.h>
    37 #include <usb/host/endpoint.h>
     36#include <ddf/driver.h>
     37#include <errno.h>
     38#include <mem.h>
     39#include <stdio.h>
    3840#include <usb/debug.h>
    39 #include <ddf/driver.h>
    40 
    41 #include <mem.h>
    42 #include <errno.h>
    43 #include <stdio.h>
     41
     42#include "endpoint.h"
     43#include "bus.h"
    4444
    4545/**
  • uspace/lib/usbhost/src/ddf_helpers.c

    rb60eac1 r64fea02  
    3434 */
    3535
    36 #include <usb/classes/classes.h>
    37 #include <usb/host/bus.h>
    38 #include <usb/debug.h>
    39 #include <usb/descriptor.h>
    40 #include <usb/request.h>
    41 #include <usb/usb.h>
    42 
    4336#include <adt/list.h>
    4437#include <assert.h>
     
    4841#include <device/hw_res_parsed.h>
    4942#include <errno.h>
    50 #include <fibril_synch.h>
    51 #include <macros.h>
    52 #include <stdlib.h>
    5343#include <str_error.h>
     44#include <usb/classes/classes.h>
     45#include <usb/debug.h>
     46#include <usb/descriptor.h>
     47#include <usb/usb.h>
    5448#include <usb_iface.h>
    5549#include <usbhc_iface.h>
     50
     51#include "bus.h"
    5652
    5753#include "ddf_helpers.h"
  • uspace/lib/usbhost/src/dma_buffer.c

    rb60eac1 r64fea02  
    3333 */
    3434
    35 #include <usb/host/dma_buffer.h>
    36 
    3735#include <align.h>
    3836#include <as.h>
    3937#include <ddi.h>
    4038#include <stddef.h>
     39
     40#include "dma_buffer.h"
    4141
    4242dma_policy_t dma_policy_default = {
  • uspace/lib/usbhost/src/endpoint.c

    rb60eac1 r64fea02  
    3535 */
    3636
    37 #include <usb/host/endpoint.h>
    38 #include <usb/host/usb_transfer_batch.h>
    39 #include <usb/host/bus.h>
    40 
    4137#include <assert.h>
    4238#include <atomic.h>
    4339#include <mem.h>
    4440#include <stdlib.h>
     41
     42#include "usb_transfer_batch.h"
     43#include "bus.h"
     44
     45#include "endpoint.h"
    4546
    4647/** Initialize provided endpoint structure.
     
    153154}
    154155
    155 
    156156/**
    157157 * @}
  • uspace/lib/usbhost/src/hcd.c

    rb60eac1 r64fea02  
    3434 */
    3535
    36 #include <usb/debug.h>
    37 #include <usb/descriptor.h>
    38 #include <usb/request.h>
    39 
    4036#include <assert.h>
    4137#include <async.h>
    4238#include <errno.h>
    4339#include <macros.h>
     40#include <str_error.h>
     41#include <usb/debug.h>
     42#include <usb/descriptor.h>
     43#include <usb/request.h>
    4444#include <usb_iface.h>
    45 #include <str_error.h>
     45
     46#include "bus.h"
     47#include "endpoint.h"
     48#include "usb_transfer_batch.h"
    4649
    4750#include "hcd.h"
  • uspace/lib/usbhost/src/usb2_bus.c

    rb60eac1 r64fea02  
    3434 */
    3535
    36 #include <usb/host/usb2_bus.h>
    37 #include <usb/host/endpoint.h>
    38 #include <usb/host/ddf_helpers.h>
    39 #include <usb/debug.h>
    40 #include <usb/request.h>
    41 #include <usb/descriptor.h>
    42 #include <usb/usb.h>
    43 
    4436#include <assert.h>
    4537#include <errno.h>
    4638#include <macros.h>
     39#include <stdbool.h>
     40#include <stdlib.h>
    4741#include <str_error.h>
    48 #include <stdlib.h>
    49 #include <stdbool.h>
     42#include <usb/debug.h>
     43#include <usb/descriptor.h>
     44#include <usb/request.h>
     45#include <usb/usb.h>
     46
     47#include "endpoint.h"
     48#include "ddf_helpers.h"
     49
     50#include "usb2_bus.h"
    5051
    5152/** Ops receive generic bus_t pointer. */
  • uspace/lib/usbhost/src/usb_transfer_batch.c

    rb60eac1 r64fea02  
    3333 */
    3434
    35 #include <usb/host/usb_transfer_batch.h>
    36 #include <usb/host/endpoint.h>
    37 #include <usb/host/bus.h>
     35#include <assert.h>
     36#include <errno.h>
     37#include <stdlib.h>
     38#include <str_error.h>
    3839#include <usb/debug.h>
    3940
    40 #include <assert.h>
    41 #include <stdlib.h>
    42 #include <errno.h>
    43 #include <str_error.h>
     41#include "endpoint.h"
     42#include "bus.h"
    4443
     44#include "usb_transfer_batch.h"
    4545
    4646/** Create a batch on given endpoint.
Note: See TracChangeset for help on using the changeset viewer.