summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/usb/arcotg_dcd.c4
-rw-r--r--firmware/export/usbstack.h2
-rw-r--r--firmware/usbstack/controller.h20
-rw-r--r--firmware/usbstack/core.h20
-rw-r--r--firmware/usbstack/drivers/device/usb_serial.c3
-rw-r--r--firmware/usbstack/drivers/device/usb_storage.c3
-rw-r--r--firmware/usbstack/utils.h25
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)
116/*-------------------------------------------------------------------------*/ 116/*-------------------------------------------------------------------------*/
117 117
118/* gets called by usb_stack_init() to register 118/* gets called by usb_stack_init() to register
119 * this arcotg device conrtollder driver in the 119 * this arcotg device controller driver in the
120 * stack. */ 120 * stack. */
121void usb_dcd_init(void) 121void usb_dcd_init(void)
122{ 122{
@@ -415,7 +415,7 @@ static void port_change_int(void)
415static void dtd_complete(void) { 415static void dtd_complete(void) {
416 416
417 uint32_t bit_pos; 417 uint32_t bit_pos;
418 int i, ep_num, direction, bit_mask, status; 418 int i, ep_num, direction, bit_mask /*, status*/;
419 419
420 /* clear the bits in the register */ 420 /* clear the bits in the register */
421 bit_pos = UDC_ENDPTCOMPLETE; 421 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 @@
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/ 7 * \/ \/ \/ \/ \/
8 * $Id: $ 8 * $Id$
9 * 9 *
10 * Copyright (C) 2007 by Christian Gmeiner 10 * Copyright (C) 2007 by Christian Gmeiner
11 * 11 *
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 @@
20#ifndef _USBSTACK_CONTROLLER_H_ 20#ifndef _USBSTACK_CONTROLLER_H_
21#define _USBSTACK_CONTROLLER_H_ 21#define _USBSTACK_CONTROLLER_H_
22 22
23/*
24 * stack datatypes
25 */
26struct usb_response {
27 void* buf;
28 uint32_t length;
29};
30
31struct usb_ep {
32 const char name[15];
33 uint8_t type;
34 uint32_t ep_num; /* which endpoint? */
35 uint32_t pipe_num; /* which pipe? */
36 uint32_t maxpacket;
37 bool claimed;
38
39 struct usb_endpoint_descriptor *desc;
40 struct list_head list;
41};
42
23struct usb_controller { 43struct usb_controller {
24 const char* name; 44 const char* name;
25 enum usb_controller_type type; 45 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 @@
27 27
28#include "usbstack.h" 28#include "usbstack.h"
29 29
30/*
31 * stack datatypes
32 */
33struct usb_response {
34 void* buf;
35 uint32_t length;
36};
37
38struct usb_ep {
39 const char name[15];
40 uint8_t type;
41 uint32_t ep_num; /* which endpoint? */
42 uint32_t pipe_num; /* which pipe? */
43 uint32_t maxpacket;
44 bool claimed;
45
46 struct usb_endpoint_descriptor *desc;
47 struct list_head list;
48};
49
50#include "usbstack/controller.h" 30#include "usbstack/controller.h"
51#include "usbstack/device.h" 31#include "usbstack/device.h"
52#include "usbstack/host.h" 32#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 @@
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19 19
20#include "usb_serial.h"
21#include <string.h> 20#include <string.h>
21#include "usb_serial.h"
22#include "usbstack/utils.h"
22 23
23static struct usb_dcd_controller_ops* ops; 24static struct usb_dcd_controller_ops* ops;
24 25
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 @@
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19 19
20#include "usb_storage.h"
21#include <string.h> 20#include <string.h>
21#include "usb_storage.h"
22#include "usbstack/utils.h"
22 23
23/*-------------------------------------------------------------------------*/ 24/*-------------------------------------------------------------------------*/
24 25
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 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Peter D'Hoye
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_UTILS_H_
21#define _USBSTACK_UTILS_H_
22
23int usb_stack_get_string(struct usb_string* strings, int id, uint8_t* buf);
24
25#endif /*_USBSTACK_UTILS_H_*/