diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-03-31 06:49:59 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-03-31 06:49:59 +0000 |
commit | 7eeb40b649fe8396838531fbf9966bce3b9fc2c1 (patch) | |
tree | 3ff1a8be5268be8e3b26417ba03a77588af2b1df /apps | |
parent | 928beee0d1b05e0c403288d9cd6a4122c4640223 (diff) | |
download | rockbox-7eeb40b649fe8396838531fbf9966bce3b9fc2c1.tar.gz rockbox-7eeb40b649fe8396838531fbf9966bce3b9fc2c1.zip |
iRiver: More DMA debug output
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6235 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/debug_menu.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index c973d27044..f8d3f36f02 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -171,23 +171,21 @@ bool uda1380_test(void) | |||
171 | long button; | 171 | long button; |
172 | int vol = 0x50; | 172 | int vol = 0x50; |
173 | bool done = false; | 173 | bool done = false; |
174 | char buf[80]; | ||
175 | bool play = true; | ||
174 | 176 | ||
175 | lcd_setmargins(0, 0); | 177 | lcd_setmargins(0, 0); |
176 | lcd_clear_display(); | 178 | lcd_clear_display(); |
177 | lcd_update(); | 179 | lcd_update(); |
178 | cpu_boost(true); | ||
179 | 180 | ||
181 | line = 0; | ||
182 | |||
180 | if (load_wave("/sample.wav") == -1) | 183 | if (load_wave("/sample.wav") == -1) |
181 | goto exit; | 184 | goto exit; |
182 | 185 | ||
183 | audio_pos = 0; | 186 | audio_pos = 0; |
184 | 187 | ||
185 | puts("Playing.."); | 188 | puts("Playing.."); |
186 | puts("uda1380_init"); | ||
187 | if (uda1380_init() == -1) | ||
188 | { | ||
189 | puts("UDA1380 init failed"); | ||
190 | } | ||
191 | 189 | ||
192 | audio_pos = 0; | 190 | audio_pos = 0; |
193 | pcm_set_frequency(44100); | 191 | pcm_set_frequency(44100); |
@@ -197,9 +195,26 @@ bool uda1380_test(void) | |||
197 | 195 | ||
198 | while(!done) | 196 | while(!done) |
199 | { | 197 | { |
198 | snprintf(buf, sizeof(buf), "SAR0: %08lx", SAR0); | ||
199 | lcd_puts(0, line, buf); | ||
200 | snprintf(buf, sizeof(buf), "DAR0: %08lx", DAR0); | ||
201 | lcd_puts(0, line+1, buf); | ||
202 | snprintf(buf, sizeof(buf), "BCR0: %08lx", BCR0); | ||
203 | lcd_puts(0, line+2, buf); | ||
204 | snprintf(buf, sizeof(buf), "DCR0: %08lx", DCR0); | ||
205 | lcd_puts(0, line+3, buf); | ||
206 | snprintf(buf, sizeof(buf), "DSR0: %02x", DSR0); | ||
207 | lcd_puts(0, line+4, buf); | ||
208 | lcd_update(); | ||
209 | |||
200 | button = button_get_w_tmo(HZ/2); | 210 | button = button_get_w_tmo(HZ/2); |
201 | switch(button) | 211 | switch(button) |
202 | { | 212 | { |
213 | case BUTTON_ON: | ||
214 | play = !play; | ||
215 | pcm_play_pause(play); | ||
216 | break; | ||
217 | |||
203 | case BUTTON_UP: | 218 | case BUTTON_UP: |
204 | if (vol) | 219 | if (vol) |
205 | vol--; | 220 | vol--; |
@@ -222,11 +237,9 @@ bool uda1380_test(void) | |||
222 | } | 237 | } |
223 | 238 | ||
224 | pcm_play_stop(); | 239 | pcm_play_stop(); |
225 | uda1380_mute(1); | ||
226 | 240 | ||
227 | exit: | 241 | exit: |
228 | sleep(HZ >> 1); /* Sleep 1/2 second to fade out sound */ | 242 | sleep(HZ >> 1); /* Sleep 1/2 second to fade out sound */ |
229 | cpu_boost(false); | ||
230 | 243 | ||
231 | return false; | 244 | return false; |
232 | } | 245 | } |