summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-07-10 23:38:13 +0000
committerJens Arnold <amiconn@rockbox.org>2005-07-10 23:38:13 +0000
commitb1ecc8319d3691d839b2469a91847a189a768874 (patch)
tree3e455f87a18749ed413eb255b1d278d18476e4bb
parent0d63cbba4b29c051a87986f7240dabc9f14cb49b (diff)
downloadrockbox-b1ecc8319d3691d839b2469a91847a189a768874.tar.gz
rockbox-b1ecc8319d3691d839b2469a91847a189a768874.tar.bz2
rockbox-b1ecc8319d3691d839b2469a91847a189a768874.zip
Archos devices: Removed MAS and RTC debug menu options. They are no longer used nowadays, so we can save the space.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7097 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/debug_menu.c335
1 files changed, 0 insertions, 335 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 000c557906..7778f35de4 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -946,151 +946,6 @@ bool dbg_cpufreq(void)
}
#endif
-#ifdef HAVE_RTC
-/* Read RTC RAM contents and display them */
-bool dbg_rtc(void)
-{
- char buf[32];
- unsigned char addr = 0, r, c;
- int i;
- int button;
-
-#ifdef HAVE_LCD_BITMAP
- lcd_setmargins(0, 0);
-#endif
- lcd_clear_display();
- lcd_puts(0, 0, "RTC read:");
-
- while(1)
- {
- for (r = 0; r < 4; r++) {
- snprintf(buf, 10, "0x%02x: ", addr + r*4);
- for (c = 0; c <= 3; c++) {
- i = rtc_read(addr + r*4 + c);
- snprintf(buf + 6 + c*2, 3, "%02x", i);
- }
- lcd_puts(1, r+1, buf);
- }
-
- lcd_update();
-
- button = button_get_w_tmo(HZ/2);
-
- switch(button)
- {
- case SETTINGS_INC:
- if (addr < 63-16) { addr += 16; }
- break;
-
- case SETTINGS_DEC:
- if (addr) { addr -= 16; }
- break;
-
-#ifdef BUTTON_F2
- case BUTTON_F2:
- /* clear the user RAM space */
- for (c = 0; c <= 43; c++)
- rtc_write(0x14 + c, 0);
- break;
-#endif
-
- case SETTINGS_OK:
- case SETTINGS_CANCEL:
- return false;
- }
- }
- return false;
-}
-#endif /* HAVE_RTC */
-
-#if CONFIG_HWCODEC != MASNONE
-
-#ifdef HAVE_LCD_CHARCELLS
-#define NUMROWS 1
-#else
-#define NUMROWS 4
-#endif
-/* Read MAS registers and display them */
-bool dbg_mas(void)
-{
- char buf[32];
- unsigned int addr = 0, r, i;
-
-#ifdef HAVE_LCD_BITMAP
- lcd_setmargins(0, 0);
-#endif
- lcd_clear_display();
- lcd_puts(0, 0, "MAS register read:");
-
- while(1)
- {
- for (r = 0; r < NUMROWS; r++) {
- i = mas_readreg(addr + r);
- snprintf(buf, 30, "%02x %08x", addr + r, i);
- lcd_puts(0, r+1, buf);
- }
-
- lcd_update();
-
- switch(button_get_w_tmo(HZ/16))
- {
- case SETTINGS_INC:
- addr = (addr + NUMROWS) & 0xFF; /* register addrs are 8 bit */
- break;
-
- case SETTINGS_DEC:
- addr = (addr - NUMROWS) & 0xFF; /* register addrs are 8 bit */
- break;
-
- case SETTINGS_OK:
- case SETTINGS_CANCEL:
- return false;
- }
- }
- return false;
-}
-#endif /* CONFIG_HWCODEC != MASNONE */
-
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
-bool dbg_mas_codec(void)
-{
- char buf[32];
- unsigned int addr = 0, r, i;
-
-#ifdef HAVE_LCD_BITMAP
- lcd_setmargins(0, 0);
-#endif
- lcd_clear_display();
- lcd_puts(0, 0, "MAS codec reg read:");
-
- while(1)
- {
- for (r = 0; r < 4; r++) {
- i = mas_codec_readreg(addr + r);
- snprintf(buf, 30, "0x%02x: %08x", addr + r, i);
- lcd_puts(1, r+1, buf);
- }
-
- lcd_update();
-
- switch(button_get_w_tmo(HZ/16))
- {
- case SETTINGS_INC:
- addr += 4;
- break;
- case SETTINGS_DEC:
- if (addr) { addr -= 4; }
- break;
-
- case SETTINGS_OK:
- case SETTINGS_CANCEL:
- return false;
- }
- }
- return false;
-}
-#endif
-
#ifdef HAVE_LCD_BITMAP
/*
* view_battery() shows a automatically scaled graph of the battery voltage
@@ -1253,182 +1108,6 @@ bool view_battery(void)
#endif
-#if CONFIG_HWCODEC == MAS3507D
-bool dbg_mas_info(void)
-{
- int button;
- char buf[32];
- int currval = 0;
- unsigned long val;
- unsigned long pll48, pll44, config;
- int pll_toggle = 0;
-
-#ifdef HAVE_LCD_BITMAP
- lcd_setmargins(0, 0);
-#endif
- while(1)
- {
- switch(currval)
- {
- case 0:
- mas_readmem(MAS_BANK_D1, 0xff7, &val, 1);
- lcd_puts(0, 0, "Design Code");
- snprintf(buf, 32, "%05lx ", val);
- break;
- case 1:
- lcd_puts(0, 0, "DC/DC mode ");
- snprintf(buf, 32, "8e: %05x ", mas_readreg(0x8e) & 0xfffff);
- break;
- case 2:
- lcd_puts(0, 0, "Mute/Bypass");
- snprintf(buf, 32, "aa: %05x ", mas_readreg(0xaa) & 0xfffff);
- break;
- case 3:
- lcd_puts(0, 0, "PIOData ");
- snprintf(buf, 32, "ed: %05x ", mas_readreg(0xed) & 0xfffff);
- break;
- case 4:
- lcd_puts(0, 0, "Startup Cfg");
- snprintf(buf, 32, "e6: %05x ", mas_readreg(0xe6) & 0xfffff);
- break;
- case 5:
- lcd_puts(0, 0, "KPrescale ");
- snprintf(buf, 32, "e7: %05x ", mas_readreg(0xe7) & 0xfffff);
- break;
- case 6:
- lcd_puts(0, 0, "KBass ");
- snprintf(buf, 32, "6b: %05x ", mas_readreg(0x6b) & 0xfffff);
- break;
- case 7:
- lcd_puts(0, 0, "KTreble ");
- snprintf(buf, 32, "6f: %05x ", mas_readreg(0x6f) & 0xfffff);
- break;
- case 8:
- mas_readmem(MAS_BANK_D0, MAS_D0_MPEG_FRAME_COUNT, &val, 1);
- lcd_puts(0, 0, "Frame Count");
- snprintf(buf, 32, "0/300: %04x", (unsigned int)(val & 0xffff));
- break;
- case 9:
- mas_readmem(MAS_BANK_D0, MAS_D0_MPEG_STATUS_1, &val, 1);
- lcd_puts(0, 0, "Status1 ");
- snprintf(buf, 32, "0/301: %04x", (unsigned int)(val & 0xffff));
- break;
- case 10:
- mas_readmem(MAS_BANK_D0, MAS_D0_MPEG_STATUS_2, &val, 1);
- lcd_puts(0, 0, "Status2 ");
- snprintf(buf, 32, "0/302: %04x", (unsigned int)(val & 0xffff));
- break;
- case 11:
- mas_readmem(MAS_BANK_D0, MAS_D0_CRC_ERROR_COUNT, &val, 1);
- lcd_puts(0, 0, "CRC Count ");
- snprintf(buf, 32, "0/303: %04x", (unsigned int)(val & 0xffff));
- break;
- case 12:
- mas_readmem(MAS_BANK_D0, 0x36d, &val, 1);
- lcd_puts(0, 0, "PLLOffset48");
- snprintf(buf, 32, "0/36d %05lx", val & 0xfffff);
- break;
- case 13:
- mas_readmem(MAS_BANK_D0, 0x32d, &val, 1);
- lcd_puts(0, 0, "PLLOffset48");
- snprintf(buf, 32, "0/32d %05lx", val & 0xfffff);
- break;
- case 14:
- mas_readmem(MAS_BANK_D0, 0x36e, &val, 1);
- lcd_puts(0, 0, "PLLOffset44");
- snprintf(buf, 32, "0/36e %05lx", val & 0xfffff);
- break;
- case 15:
- mas_readmem(MAS_BANK_D0, 0x32e, &val, 1);
- lcd_puts(0, 0, "PLLOffset44");
- snprintf(buf, 32, "0/32e %05lx", val & 0xfffff);
- break;
- case 16:
- mas_readmem(MAS_BANK_D0, 0x36f, &val, 1);
- lcd_puts(0, 0, "OutputConf ");
- snprintf(buf, 32, "0/36f %05lx", val & 0xfffff);
- break;
- case 17:
- mas_readmem(MAS_BANK_D0, 0x32f, &val, 1);
- lcd_puts(0, 0, "OutputConf ");
- snprintf(buf, 32, "0/32f %05lx", val & 0xfffff);
- break;
- case 18:
- mas_readmem(MAS_BANK_D1, 0x7f8, &val, 1);
- lcd_puts(0, 0, "LL Gain ");
- snprintf(buf, 32, "1/7f8 %05lx", val & 0xfffff);
- break;
- case 19:
- mas_readmem(MAS_BANK_D1, 0x7f9, &val, 1);
- lcd_puts(0, 0, "LR Gain ");
- snprintf(buf, 32, "1/7f9 %05lx", val & 0xfffff);
- break;
- case 20:
- mas_readmem(MAS_BANK_D1, 0x7fa, &val, 1);
- lcd_puts(0, 0, "RL Gain ");
- snprintf(buf, 32, "1/7fa %05lx", val & 0xfffff);
- break;
- case 21:
- mas_readmem(MAS_BANK_D1, 0x7fb, &val, 1);
- lcd_puts(0, 0, "RR Gain ");
- snprintf(buf, 32, "1/7fb %05lx", val & 0xfffff);
- break;
- case 22:
- lcd_puts(0, 0, "L Trailbits");
- snprintf(buf, 32, "c5: %05x ", mas_readreg(0xc5) & 0xfffff);
- break;
- case 23:
- lcd_puts(0, 0, "R Trailbits");
- snprintf(buf, 32, "c6: %05x ", mas_readreg(0xc6) & 0xfffff);
- break;
- }
- lcd_puts(0, 1, buf);
-
- button = button_get_w_tmo(HZ/5);
- switch(button)
- {
- case SETTINGS_CANCEL:
- return false;
-
- case SETTINGS_DEC:
- currval--;
- if(currval < 0)
- currval = 23;
- break;
-
- case SETTINGS_INC:
- currval++;
- if(currval > 23)
- currval = 0;
- break;
-
- case SETTINGS_OK:
- pll_toggle = !pll_toggle;
- if(pll_toggle)
- {
- /* 14.31818 MHz crystal */
- pll48 = 0x5d9d0;
- pll44 = 0xfffceceb;
- config = 0;
- }
- else
- {
- /* 14.725 MHz crystal */
- pll48 = 0x2d0de;
- pll44 = 0xfffa2319;
- config = 0;
- }
- mas_writemem(MAS_BANK_D0, 0x32d, &pll48, 1);
- mas_writemem(MAS_BANK_D0, 0x32e, &pll44, 1);
- mas_writemem(MAS_BANK_D0, 0x32f, &config, 1);
- mas_run(0x475);
- break;
- }
- }
- return false;
-}
-#endif
-
static bool view_runtime(void)
{
char s[32];
@@ -1893,23 +1572,9 @@ bool debug_menu(void)
{ "PCM recording", pcm_rec_screen },
#endif
#if CONFIG_CPU == SH7034
-#ifdef HAVE_LCD_BITMAP
-#ifdef HAVE_RTC
- { "View/clr RTC RAM", dbg_rtc },
-#endif /* HAVE_RTC */
-#endif /* HAVE_LCD_BITMAP */
{ "Catch mem accesses", dbg_set_memory_guard },
#endif /* CONFIG_CPU == SH7034 */
{ "View OS stacks", dbg_os },
-#if CONFIG_HWCODEC == MAS3507D
- { "View MAS info", dbg_mas_info },
-#endif
-#if CONFIG_HWCODEC != MASNONE
- { "View MAS regs", dbg_mas },
-#endif
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
- { "View MAS codec", dbg_mas_codec },
-#endif
#ifdef HAVE_LCD_BITMAP
{ "View battery", view_battery },
{ "Screendump", dbg_screendump },