source: mainline/uspace/drv/ohci/batch.h@ 2c1f24c

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 2c1f24c was 41b96b4, checked in by Jan Vesely <jano.vesely@…>, 15 years ago

OHCI stub

  • Property mode set to 100644
File size: 2.8 KB
Line 
1/*
2 * Copyright (c) 2011 Jan Vesely
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28/** @addtogroup drvusbuhcihc
29 * @{
30 */
31/** @file
32 * @brief UHCI driver USB transaction structure
33 */
34#ifndef DRV_UHCI_BATCH_H
35#define DRV_UHCI_BATCH_H
36
37#include <adt/list.h>
38
39#include <usbhc_iface.h>
40#include <usb/usb.h>
41
42typedef struct batch
43{
44 link_t link;
45 usb_speed_t speed;
46 usb_target_t target;
47 usb_transfer_type_t transfer_type;
48 usbhc_iface_transfer_in_callback_t callback_in;
49 usbhc_iface_transfer_out_callback_t callback_out;
50 void *arg;
51 char *transport_buffer;
52 char *setup_buffer;
53 size_t setup_size;
54 char *buffer;
55 size_t buffer_size;
56 size_t max_packet_size;
57 size_t packets;
58 size_t transfered_size;
59 int error;
60 ddf_fun_t *fun;
61 void (*next_step)(struct batch*);
62} batch_t;
63
64batch_t * batch_get(
65 ddf_fun_t *fun,
66 usb_target_t target,
67 usb_transfer_type_t transfer_type,
68 size_t max_packet_size,
69 usb_speed_t speed,
70 char *buffer,
71 size_t size,
72 char *setup_buffer,
73 size_t setup_size,
74 usbhc_iface_transfer_in_callback_t func_in,
75 usbhc_iface_transfer_out_callback_t func_out,
76 void *arg
77 );
78
79void batch_dispose(batch_t *instance);
80
81void batch_finish(batch_t *instance, int error);
82
83bool batch_is_complete(batch_t *instance);
84
85void batch_control_write(batch_t *instance);
86
87void batch_control_read(batch_t *instance);
88
89void batch_interrupt_in(batch_t *instance);
90
91void batch_interrupt_out(batch_t *instance);
92
93void batch_bulk_in(batch_t *instance);
94
95void batch_bulk_out(batch_t *instance);
96#endif
97/**
98 * @}
99 */
Note: See TracBrowser for help on using the repository browser.