diff options
-rw-r--r-- | firmware/drivers/usb/arcotg_dcd.c | 4 | ||||
-rw-r--r-- | firmware/export/usbstack.h | 2 | ||||
-rw-r--r-- | firmware/usbstack/controller.h | 20 | ||||
-rw-r--r-- | firmware/usbstack/core.h | 20 | ||||
-rw-r--r-- | firmware/usbstack/drivers/device/usb_serial.c | 3 | ||||
-rw-r--r-- | firmware/usbstack/drivers/device/usb_storage.c | 3 | ||||
-rw-r--r-- | firmware/usbstack/utils.h | 25 |
7 files changed, 52 insertions, 25 deletions
diff --git a/firmware/drivers/usb/arcotg_dcd.c b/firmware/drivers/usb/arcotg_dcd.c index 124742cf13..0674342eb9 100644 --- a/firmware/drivers/usb/arcotg_dcd.c +++ b/firmware/drivers/usb/arcotg_dcd.c @@ -116,7 +116,7 @@ timer_expired(struct timer * timer) /*-------------------------------------------------------------------------*/ /* gets called by usb_stack_init() to register - * this arcotg device conrtollder driver in the + * this arcotg device controller driver in the * stack. */ void usb_dcd_init(void) { @@ -415,7 +415,7 @@ static void port_change_int(void) static void dtd_complete(void) { uint32_t bit_pos; - int i, ep_num, direction, bit_mask, status; + int i, ep_num, direction, bit_mask /*, status*/; /* clear the bits in the register */ bit_pos = UDC_ENDPTCOMPLETE; diff --git a/firmware/export/usbstack.h b/firmware/export/usbstack.h index 9142b1bdba..bf1c2db5bf 100644 --- a/firmware/export/usbstack.h +++ b/firmware/export/usbstack.h @@ -5,7 +5,7 @@ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ - * $Id: $ + * $Id$ * * Copyright (C) 2007 by Christian Gmeiner * diff --git a/firmware/usbstack/controller.h b/firmware/usbstack/controller.h index 4e742035e6..c91eab785a 100644 --- a/firmware/usbstack/controller.h +++ b/firmware/usbstack/controller.h @@ -20,6 +20,26 @@ #ifndef _USBSTACK_CONTROLLER_H_ #define _USBSTACK_CONTROLLER_H_ +/* + * stack datatypes + */ +struct usb_response { + void* buf; + uint32_t length; +}; + +struct usb_ep { + const char name[15]; + uint8_t type; + uint32_t ep_num; /* which endpoint? */ + uint32_t pipe_num; /* which pipe? */ + uint32_t maxpacket; + bool claimed; + + struct usb_endpoint_descriptor *desc; + struct list_head list; +}; + struct usb_controller { const char* name; enum usb_controller_type type; diff --git a/firmware/usbstack/core.h b/firmware/usbstack/core.h index 2c79c64633..c47232f120 100644 --- a/firmware/usbstack/core.h +++ b/firmware/usbstack/core.h @@ -27,26 +27,6 @@ #include "usbstack.h" -/* - * stack datatypes - */ -struct usb_response { - void* buf; - uint32_t length; -}; - -struct usb_ep { - const char name[15]; - uint8_t type; - uint32_t ep_num; /* which endpoint? */ - uint32_t pipe_num; /* which pipe? */ - uint32_t maxpacket; - bool claimed; - - struct usb_endpoint_descriptor *desc; - struct list_head list; -}; - #include "usbstack/controller.h" #include "usbstack/device.h" #include "usbstack/host.h" diff --git a/firmware/usbstack/drivers/device/usb_serial.c b/firmware/usbstack/drivers/device/usb_serial.c index c8850042cd..51def1c3b6 100644 --- a/firmware/usbstack/drivers/device/usb_serial.c +++ b/firmware/usbstack/drivers/device/usb_serial.c @@ -17,8 +17,9 @@ * ****************************************************************************/ -#include "usb_serial.h" #include <string.h> +#include "usb_serial.h" +#include "usbstack/utils.h" static struct usb_dcd_controller_ops* ops; diff --git a/firmware/usbstack/drivers/device/usb_storage.c b/firmware/usbstack/drivers/device/usb_storage.c index 8fc9df672f..f9fca55b73 100644 --- a/firmware/usbstack/drivers/device/usb_storage.c +++ b/firmware/usbstack/drivers/device/usb_storage.c @@ -17,8 +17,9 @@ * ****************************************************************************/ -#include "usb_storage.h" #include <string.h> +#include "usb_storage.h" +#include "usbstack/utils.h" /*-------------------------------------------------------------------------*/ diff --git a/firmware/usbstack/utils.h b/firmware/usbstack/utils.h new file mode 100644 index 0000000000..4b368a9126 --- /dev/null +++ b/firmware/usbstack/utils.h @@ -0,0 +1,25 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2007 by Peter D'Hoye + * + * 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_UTILS_H_ +#define _USBSTACK_UTILS_H_ + +int usb_stack_get_string(struct usb_string* strings, int id, uint8_t* buf); + +#endif /*_USBSTACK_UTILS_H_*/ |