diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-30 13:24:29 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-30 13:24:29 +0000 |
commit | 6c77cc3576ab3ebd401c52e7e53b84042e052dbe (patch) | |
tree | 5756751b51bbbf5c4856bbabb8ae6731527b9d02 | |
parent | e0b23fe50d1d3a80d4778195c2e7b1fc8098a603 (diff) | |
download | rockbox-6c77cc3576ab3ebd401c52e7e53b84042e052dbe.tar.gz rockbox-6c77cc3576ab3ebd401c52e7e53b84042e052dbe.zip |
Now enables USB monitoring
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1265 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/main.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/apps/main.c b/apps/main.c index 47c91ddada..c43248e45a 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "panic.h" | 29 | #include "panic.h" |
30 | #include "menu.h" | 30 | #include "menu.h" |
31 | #include "system.h" | 31 | #include "system.h" |
32 | #include "usb.h" | ||
32 | #ifndef SIMULATOR | 33 | #ifndef SIMULATOR |
33 | #include "dmalloc.h" | 34 | #include "dmalloc.h" |
34 | #include "bmalloc.h" | 35 | #include "bmalloc.h" |
@@ -41,10 +42,40 @@ | |||
41 | 42 | ||
42 | #include "version.h" | 43 | #include "version.h" |
43 | 44 | ||
45 | #include "sh7034.h" | ||
46 | #include "sprintf.h" | ||
47 | |||
44 | char appsversion[]=APPSVERSION; | 48 | char appsversion[]=APPSVERSION; |
45 | 49 | ||
46 | void init(void); | 50 | void init(void); |
47 | 51 | ||
52 | /* Test code!!! */ | ||
53 | void dbg_ports(void) | ||
54 | { | ||
55 | unsigned short porta; | ||
56 | unsigned short portb; | ||
57 | unsigned char portc; | ||
58 | char buf[32]; | ||
59 | |||
60 | lcd_clear_display(); | ||
61 | |||
62 | while(1) | ||
63 | { | ||
64 | porta = PADR; | ||
65 | portb = PBDR; | ||
66 | portc = PCDR; | ||
67 | |||
68 | snprintf(buf, 32, "PCDR: %04x", porta); | ||
69 | lcd_puts(0, 0, buf); | ||
70 | snprintf(buf, 32, "PCDR: %04x", portb); | ||
71 | lcd_puts(0, 1, buf); | ||
72 | snprintf(buf, 32, "PCDR: %02x", portc); | ||
73 | lcd_puts(0, 2, buf); | ||
74 | lcd_update(); | ||
75 | sleep(HZ/10); | ||
76 | } | ||
77 | } | ||
78 | |||
48 | void app_main(void) | 79 | void app_main(void) |
49 | { | 80 | { |
50 | init(); | 81 | init(); |
@@ -89,6 +120,8 @@ void init(void) | |||
89 | #endif | 120 | #endif |
90 | set_irq_level(0); | 121 | set_irq_level(0); |
91 | 122 | ||
123 | usb_init(); | ||
124 | |||
92 | rc = ata_init(); | 125 | rc = ata_init(); |
93 | if(rc) | 126 | if(rc) |
94 | panicf("ata: %d",rc); | 127 | panicf("ata: %d",rc); |
@@ -107,6 +140,8 @@ void init(void) | |||
107 | mpeg_init( global_settings.volume, | 140 | mpeg_init( global_settings.volume, |
108 | global_settings.bass, | 141 | global_settings.bass, |
109 | global_settings.treble ); | 142 | global_settings.treble ); |
143 | |||
144 | usb_start_monitoring(); | ||
110 | } | 145 | } |
111 | 146 | ||
112 | int main(void) | 147 | int main(void) |