diff options
Diffstat (limited to 'firmware/target/arm/tms320dm320/creative-zvm/usb-creativezvm.c')
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/usb-creativezvm.c | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/usb-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/usb-creativezvm.c new file mode 100644 index 0000000000..6bbd08c135 --- /dev/null +++ b/firmware/target/arm/tms320dm320/creative-zvm/usb-creativezvm.c | |||
@@ -0,0 +1,65 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Maurus Cuelenaere | ||
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 | #include "config.h" | ||
21 | #include "system.h" | ||
22 | #include "kernel.h" | ||
23 | #include "usb.h" | ||
24 | #include "usb-target.h" | ||
25 | #include "usb_drv.h" | ||
26 | #include "usb_core.h" | ||
27 | #include "isp1583.h" | ||
28 | |||
29 | #define printf | ||
30 | |||
31 | bool usb_drv_connected(void) | ||
32 | { | ||
33 | return button_usb_connected(); | ||
34 | } | ||
35 | |||
36 | int usb_detect(void) | ||
37 | { | ||
38 | if(button_usb_connected()) | ||
39 | return USB_INSERTED; | ||
40 | else | ||
41 | return USB_EXTRACTED; | ||
42 | } | ||
43 | |||
44 | void usb_init_device(void) | ||
45 | { | ||
46 | return; | ||
47 | } | ||
48 | |||
49 | void usb_enable(bool on) | ||
50 | { | ||
51 | if(on) | ||
52 | usb_core_init(); | ||
53 | else | ||
54 | usb_core_exit(); | ||
55 | } | ||
56 | |||
57 | void GIO7(void) | ||
58 | { | ||
59 | #ifdef DEBUG | ||
60 | //printf("GIO7 interrupt... [%d]", current_tick); | ||
61 | #endif | ||
62 | usb_drv_int(); | ||
63 | |||
64 | IO_INTC_IRQ1 = INTR_IRQ1_EXT7; | ||
65 | } | ||