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_CORE_H_
21 #define _USBSTACK_CORE_H_
23 #include "linkedlist.h"
30 #include "usbstack/controller.h"
31 #include "usbstack/device.h"
32 #include "usbstack/host.h"
40 /* we can have maximum two controllers (one device, one host) */
41 struct usb_controller
* controller
[2];
42 struct usb_controller
* active_controller
;
43 /* device driver used by stack */
44 struct usb_device_driver
* device_driver
;
45 /* for each type of driver use own array */
46 struct usb_host_driver
* host_drivers
[NUM_DRIVERS
];
47 struct usb_device_driver
* device_drivers
[NUM_DRIVERS
];
48 enum usb_controller_type mode
;
52 void usb_stack_irq(void);
53 void usb_stack_work(void);
55 /* endpoint configuration */
56 void usb_ep_autoconfig_reset(void);
57 struct usb_ep
* usb_ep_autoconfig(struct usb_endpoint_descriptor
* desc
);
59 /* only used for debug */
60 void into_usb_ctrlrequest(struct usb_ctrlrequest
* request
);
62 extern struct usb_core usbcore
;
64 #endif /*_USBSTACK_CORE_H_*/