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/debug_menu.c | |
| parent | 928beee0d1b05e0c403288d9cd6a4122c4640223 (diff) | |
| download | rockbox-7eeb40b649fe8396838531fbf9966bce3b9fc2c1.zip rockbox-7eeb40b649fe8396838531fbf9966bce3b9fc2c1.tar.gz rockbox-7eeb40b649fe8396838531fbf9966bce3b9fc2c1.tar.bz2 rockbox-7eeb40b649fe8396838531fbf9966bce3b9fc2c1.tar.xz | |
iRiver: More DMA debug output
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6235 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
| -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 c973d27..f8d3f36 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -171,23 +171,21 @@ bool uda1380_test(void) long button; int vol = 0x50; bool done = false; + char buf[80]; + bool play = true; lcd_setmargins(0, 0); lcd_clear_display(); lcd_update(); - cpu_boost(true); + line = 0; + if (load_wave("/sample.wav") == -1) goto exit; audio_pos = 0; puts("Playing.."); - puts("uda1380_init"); - if (uda1380_init() == -1) - { - puts("UDA1380 init failed"); - } audio_pos = 0; pcm_set_frequency(44100); @@ -197,9 +195,26 @@ bool uda1380_test(void) while(!done) { + snprintf(buf, sizeof(buf), "SAR0: %08lx", SAR0); + lcd_puts(0, line, buf); + snprintf(buf, sizeof(buf), "DAR0: %08lx", DAR0); + lcd_puts(0, line+1, buf); + snprintf(buf, sizeof(buf), "BCR0: %08lx", BCR0); + lcd_puts(0, line+2, buf); + snprintf(buf, sizeof(buf), "DCR0: %08lx", DCR0); + lcd_puts(0, line+3, buf); + snprintf(buf, sizeof(buf), "DSR0: %02x", DSR0); + lcd_puts(0, line+4, buf); + lcd_update(); + button = button_get_w_tmo(HZ/2); switch(button) { + case BUTTON_ON: + play = !play; + pcm_play_pause(play); + break; + case BUTTON_UP: if (vol) vol--; @@ -222,11 +237,9 @@ bool uda1380_test(void) } pcm_play_stop(); - uda1380_mute(1); exit: sleep(HZ >> 1); /* Sleep 1/2 second to fade out sound */ - cpu_boost(false); return false; } |