summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2006-03-18 23:07:34 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2006-03-18 23:07:34 +0000
commit9ffaa175a7f1b706532605ff530d74964002298a (patch)
tree0a40383caa1519f7542e8f2c01a7a4dd993f02ea /apps/debug_menu.c
parent415fab1ca37ca36d423a8f869dbf99fabd8d786c (diff)
downloadrockbox-9ffaa175a7f1b706532605ff530d74964002298a.zip
rockbox-9ffaa175a7f1b706532605ff530d74964002298a.tar.gz
rockbox-9ffaa175a7f1b706532605ff530d74964002298a.tar.bz2
rockbox-9ffaa175a7f1b706532605ff530d74964002298a.tar.xz
iAudio fixes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9107 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index c7f2aac..b09c2ef 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -387,7 +387,7 @@ bool dbg_flash_id(unsigned* p_manufacturer, unsigned* p_device,
#else /* memory mapped */
#if CONFIG_CPU == SH7034
volatile unsigned char* flash = (unsigned char*)0x2000000; /* flash mapping */
-#elif CONFIG_CPU == MCF5249
+#elif defined(CPU_COLDFIRE)
volatile unsigned short* flash = (unsigned short*)0; /* flash mapping */
#endif
#define FLASH(addr) (flash[addr])
@@ -715,7 +715,7 @@ bool dbg_partitions(void)
return false;
}
-#ifdef CPU_COLDFIRE
+#if defined(CPU_COLDFIRE) && defined(HAVE_SPDIF)
bool dbg_spdif(void)
{
char buf[128];
@@ -943,7 +943,10 @@ bool dbg_ports(void)
unsigned int gpio1_function;
unsigned int gpio_enable;
unsigned int gpio1_enable;
- int adc_buttons, adc_remote, adc_battery, adc_remotedetect;
+ int adc_buttons, adc_remote, adc_battery;
+#ifdef IRIVER
+ int adc_remotedetect;
+#endif
char buf[128];
int button;
int line;
@@ -987,16 +990,20 @@ bool dbg_ports(void)
adc_buttons = adc_read(ADC_BUTTONS);
adc_remote = adc_read(ADC_REMOTE);
adc_battery = adc_read(ADC_BATTERY);
+#ifdef IRIVER
adc_remotedetect = adc_read(ADC_REMOTEDETECT);
-
+#endif
+
snprintf(buf, sizeof(buf), "ADC_BUTTONS: %02x", adc_buttons);
lcd_puts(0, line++, buf);
snprintf(buf, sizeof(buf), "ADC_REMOTE: %02x", adc_remote);
lcd_puts(0, line++, buf);
snprintf(buf, sizeof(buf), "ADC_BATTERY: %02x", adc_battery);
lcd_puts(0, line++, buf);
+#ifdef IRIVER
snprintf(buf, sizeof(buf), "ADC_REMOTEDETECT: %02x", adc_remotedetect);
lcd_puts(0, line++, buf);
+#endif
battery_voltage = (adc_battery * BATTERY_SCALE_FACTOR) / 10000;
batt_int = battery_voltage / 100;
@@ -1006,9 +1013,11 @@ bool dbg_ports(void)
battery_level());
lcd_puts(0, line++, buf);
+#ifdef IRIVER
snprintf(buf, sizeof(buf), "remotetype:: %d", remote_type());
lcd_puts(0, line++, buf);
-
+#endif
+
lcd_update();
button = button_get_w_tmo(HZ/10);
@@ -1890,6 +1899,8 @@ bool dbg_save_roms(void)
fd = creat("/internal_rom_000000-1FFFFF.bin", O_WRONLY);
#elif defined(IRIVER_H300_SERIES)
fd = creat("/internal_rom_000000-3FFFFF.bin", O_WRONLY);
+#elif defined(IAUDIO_X5)
+ fd = creat("/internal_rom_000000-3FFFFF.bin", O_WRONLY);
#endif
if(fd >= 0)
{