Add some screenshots for Sansa c200.
[Rockbox.git] / firmware / usbstack / core.h
blobc47232f1209d226958ab3eb1d49ef14c45e8ff9f
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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"
24 #include "usb_ch9.h"
25 #include "logf.h"
26 #include "system.h"
28 #include "usbstack.h"
30 #include "usbstack/controller.h"
31 #include "usbstack/device.h"
32 #include "usbstack/host.h"
34 #define NUM_DRIVERS 3
37 * usb core
39 struct usb_core {
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;
49 bool running;
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_*/