summaryrefslogtreecommitdiff
path: root/firmware/usbstack/device.h
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2007-08-27 16:04:32 +0000
committerChristian Gmeiner <christian.gmeiner@gmail.com>2007-08-27 16:04:32 +0000
commit8181a0c905a591caef684a2d7487feedbec84c10 (patch)
tree3939183e8e73928d1b5dcfc97b40f33b6baa309b /firmware/usbstack/device.h
parent9305c86f5b8fdfd60882428f884ba29bded8da78 (diff)
downloadrockbox-8181a0c905a591caef684a2d7487feedbec84c10.tar.gz
rockbox-8181a0c905a591caef684a2d7487feedbec84c10.zip
Usb Stack: only setup packet handling, and not enabled by default as there is a lot to do.
* settings code is not fully ready -> changing device driver has no effect * clean ups * check copyriths * find a way to detect IN transfers * support for full and highspeed * ... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14470 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usbstack/device.h')
-rw-r--r--firmware/usbstack/device.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/firmware/usbstack/device.h b/firmware/usbstack/device.h
new file mode 100644
index 0000000000..5b385d8129
--- /dev/null
+++ b/firmware/usbstack/device.h
@@ -0,0 +1,48 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: arcotg_udc.c 12340 2007-02-16 22:13:21Z barrywardell $
9 *
10 * Copyright (C) 2007 by Christian Gmeiner
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef _USBSTACK_DEVICE_H_
21#define _USBSTACK_DEVICE_H_
22
23/*
24 * usb device driver
25 */
26struct usb_device_driver {
27 const char* name;
28 void (*bind)(void* controller_ops);
29 void (*unbind)(void);
30 int (*request)(struct usb_ctrlrequest* req);
31 void (*suspend)(void);
32 void (*resume)(void);
33 void (*speed)(enum usb_device_speed speed);
34 struct usb_descriptors* descriptors;
35 void* data; /* used to store controller specific ops struct */
36};
37
38int usb_device_driver_register(struct usb_device_driver* driver);
39
40/* forward declaration */
41struct usb_config_descriptor;
42struct usb_descriptor_header;
43
44int usb_stack_configdesc(const struct usb_config_descriptor* config,
45 void* buf, unsigned length,
46 struct usb_descriptor_header** desc);
47
48#endif /*_USBSTACK_DEVICE_H_*/