1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2007 by Christian Gmeiner
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.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef _USBSTACK_DEVICE_H_
21 #define _USBSTACK_DEVICE_H_
26 struct usb_device_driver
{
28 int (*bind
)(void* controller_ops
);
30 int (*request
)(struct usb_ctrlrequest
* req
);
31 void (*suspend
)(void);
33 void (*speed
)(enum usb_device_speed speed
);
34 void* data
; /* used to store controller specific ops struct */
37 int usb_device_driver_register(struct usb_device_driver
* driver
);
39 /* forward declaration */
40 struct usb_config_descriptor
;
41 struct usb_descriptor_header
;
43 int usb_stack_configdesc(const struct usb_config_descriptor
* config
,
44 void* buf
, unsigned length
,
45 struct usb_descriptor_header
** desc
);
47 #endif /*_USBSTACK_DEVICE_H_*/