summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2007-09-30 12:25:06 +0000
committerChristian Gmeiner <christian.gmeiner@gmail.com>2007-09-30 12:25:06 +0000
commit0f5d9f9125e53ae62175469e78151ca4cb0be79a (patch)
treef2b1089fd8fe18eeabc36038cb0f8ae9e39c6429 /firmware
parent6386dbe861bc3395dff1bca5b98e8cbe33ddc703 (diff)
downloadrockbox-0f5d9f9125e53ae62175469e78151ca4cb0be79a.tar.gz
rockbox-0f5d9f9125e53ae62175469e78151ca4cb0be79a.zip
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.h12
-rw-r--r--firmware/usbstack/config.h31
-rw-r--r--firmware/usbstack/core/core.c4
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 @@
22 22
23#include <errno.h> 23#include <errno.h>
24 24
25#define USB_STACK_MAX_SETTINGS_NAME 32*10 /* should be enough for > 10 driver names */ 25#define USB_STACK_MAX_SETTINGS_NAME 32*10 /* should be enough for > 10 driver names */
26
27/* usb stack configuration */
28#ifndef USBSTACK_CAPS
29#define USBSTACK_CAPS 0 /* default: use no controller */
30#endif
31
32#define CONTROLLER_DEVICE (1 << 0)
33#define CONTROLLER_HOST (1 << 1)
26 34
27/* 35/*
28 * error codes 36 * error codes
@@ -30,7 +38,7 @@
30#define ENOFREESLOT 1 38#define ENOFREESLOT 1
31#define EWRONGCONTROLLERTYPE 2 39#define EWRONGCONTROLLERTYPE 2
32#define ENODRIVERFOUND 3 40#define ENODRIVERFOUND 3
33#define EHWCRITICAL 4 41#define EHWCRITICAL 4
34 42
35enum usb_controller_type { 43enum usb_controller_type {
36 DEVICE = 0, 44 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 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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_CONFIG_H_
21#define _USBSTACK_CONFIG_H_
22
23/* default: use no controller */
24#ifndef USBSTACK_CAPS
25#define USBSTACK_CAPS 0
26#endif
27
28#define CONTROLLER_DEVICE (1 << 0)
29#define CONTROLLER_HOST (1 << 1)
30
31#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 @@
20#include <errno.h> 20#include <errno.h>
21#include <string.h> 21#include <string.h>
22#include <ctype.h> 22#include <ctype.h>
23#include "usbstack.h"
24
25#include "config.h" 23#include "config.h"
26 24
25#include "usbstack.h"
27#include "usbstack/core.h" 26#include "usbstack/core.h"
28#include "usbstack/config.h"
29#include "usbstack/controller.h" 27#include "usbstack/controller.h"
30#include "usbstack/drivers/device/usb_serial.h" 28#include "usbstack/drivers/device/usb_serial.h"
31#include "usbstack/drivers/device/usb_storage.h" 29#include "usbstack/drivers/device/usb_storage.h"