diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2007-09-30 12:25:06 +0000 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2007-09-30 12:25:06 +0000 |
commit | 0f5d9f9125e53ae62175469e78151ca4cb0be79a (patch) | |
tree | f2b1089fd8fe18eeabc36038cb0f8ae9e39c6429 /firmware | |
parent | 6386dbe861bc3395dff1bca5b98e8cbe33ddc703 (diff) |
first part of usbstack patches -> show and use selection of usb stack mode only, if
a target supports both modes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14916 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/export/usbstack.h | 12 | ||||
-rw-r--r-- | firmware/usbstack/config.h | 31 | ||||
-rw-r--r-- | firmware/usbstack/core/core.c | 4 |
3 files changed, 11 insertions, 36 deletions
diff --git a/firmware/export/usbstack.h b/firmware/export/usbstack.h index bf1c2db5bf..4ad477ec97 100644 --- a/firmware/export/usbstack.h +++ b/firmware/export/usbstack.h @@ -22,7 +22,15 @@ #include <errno.h> -#define USB_STACK_MAX_SETTINGS_NAME 32*10 /* should be enough for > 10 driver names */ +#define USB_STACK_MAX_SETTINGS_NAME 32*10 /* should be enough for > 10 driver names */ + +/* usb stack configuration */ +#ifndef USBSTACK_CAPS +#define USBSTACK_CAPS 0 /* default: use no controller */ +#endif + +#define CONTROLLER_DEVICE (1 << 0) +#define CONTROLLER_HOST (1 << 1) /* * error codes @@ -30,7 +38,7 @@ #define ENOFREESLOT 1 #define EWRONGCONTROLLERTYPE 2 #define ENODRIVERFOUND 3 -#define EHWCRITICAL 4 +#define EHWCRITICAL 4 enum usb_controller_type { DEVICE = 0, diff --git a/firmware/usbstack/config.h b/firmware/usbstack/config.h deleted file mode 100644 index 8990934e56..0000000000 --- a/firmware/usbstack/config.h +++ /dev/null @@ -1,31 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2007 by Christian Gmeiner - * - * All files in this archive are subject to the GNU General Public License. - * See the file COPYING in the source tree root for full license agreement. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#ifndef _USBSTACK_CONFIG_H_ -#define _USBSTACK_CONFIG_H_ - -/* default: use no controller */ -#ifndef USBSTACK_CAPS -#define USBSTACK_CAPS 0 -#endif - -#define CONTROLLER_DEVICE (1 << 0) -#define CONTROLLER_HOST (1 << 1) - -#endif /*_USBSTACK_CONFIG_H_*/ diff --git a/firmware/usbstack/core/core.c b/firmware/usbstack/core/core.c index 0d2cfc67b9..f72b3bbed8 100644 --- a/firmware/usbstack/core/core.c +++ b/firmware/usbstack/core/core.c @@ -20,12 +20,10 @@ #include <errno.h> #include <string.h> #include <ctype.h> -#include "usbstack.h" - #include "config.h" +#include "usbstack.h" #include "usbstack/core.h" -#include "usbstack/config.h" #include "usbstack/controller.h" #include "usbstack/drivers/device/usb_serial.h" #include "usbstack/drivers/device/usb_storage.h" |