diff options
Diffstat (limited to 'firmware/export/usbstack.h')
-rw-r--r-- | firmware/export/usbstack.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/firmware/export/usbstack.h b/firmware/export/usbstack.h new file mode 100644 index 0000000000..9142b1bdba --- /dev/null +++ b/firmware/export/usbstack.h | |||
@@ -0,0 +1,55 @@ | |||
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_H_ | ||
21 | #define _USBSTACK_H_ | ||
22 | |||
23 | #include <errno.h> | ||
24 | |||
25 | #define USB_STACK_MAX_SETTINGS_NAME 32*10 /* should be enough for > 10 driver names */ | ||
26 | |||
27 | /* | ||
28 | * error codes | ||
29 | */ | ||
30 | #define ENOFREESLOT 1 | ||
31 | #define EWRONGCONTROLLERTYPE 2 | ||
32 | #define ENODRIVERFOUND 3 | ||
33 | #define EHWCRITICAL 4 | ||
34 | |||
35 | enum usb_controller_type { | ||
36 | DEVICE = 0, | ||
37 | HOST, | ||
38 | }; | ||
39 | |||
40 | /* | ||
41 | * stack routines | ||
42 | */ | ||
43 | void usb_stack_init(void); | ||
44 | void usb_stack_start(void); | ||
45 | void usb_stack_stop(void); | ||
46 | |||
47 | void usb_controller_select(int type); | ||
48 | int usb_stack_get_mode(void); | ||
49 | int usb_device_driver_bind(const char* name); | ||
50 | void ubs_device_driver_unbind(void); | ||
51 | |||
52 | /* used by apps settings code */ | ||
53 | unsigned char device_driver_names[USB_STACK_MAX_SETTINGS_NAME]; | ||
54 | |||
55 | #endif /*_USBSTACK_H_*/ | ||