diff options
Diffstat (limited to 'firmware/usbstack/device.h')
-rw-r--r-- | firmware/usbstack/device.h | 48 |
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 | */ | ||
26 | struct 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 | |||
38 | int usb_device_driver_register(struct usb_device_driver* driver); | ||
39 | |||
40 | /* forward declaration */ | ||
41 | struct usb_config_descriptor; | ||
42 | struct usb_descriptor_header; | ||
43 | |||
44 | int 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_*/ | ||