diff options
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r-- | apps/debug_menu.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index c7f2aac802..b09c2efd12 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, | |||
387 | #else /* memory mapped */ | 387 | #else /* memory mapped */ |
388 | #if CONFIG_CPU == SH7034 | 388 | #if CONFIG_CPU == SH7034 |
389 | volatile unsigned char* flash = (unsigned char*)0x2000000; /* flash mapping */ | 389 | volatile unsigned char* flash = (unsigned char*)0x2000000; /* flash mapping */ |
390 | #elif CONFIG_CPU == MCF5249 | 390 | #elif defined(CPU_COLDFIRE) |
391 | volatile unsigned short* flash = (unsigned short*)0; /* flash mapping */ | 391 | volatile unsigned short* flash = (unsigned short*)0; /* flash mapping */ |
392 | #endif | 392 | #endif |
393 | #define FLASH(addr) (flash[addr]) | 393 | #define FLASH(addr) (flash[addr]) |
@@ -715,7 +715,7 @@ bool dbg_partitions(void) | |||
715 | return false; | 715 | return false; |
716 | } | 716 | } |
717 | 717 | ||
718 | #ifdef CPU_COLDFIRE | 718 | #if defined(CPU_COLDFIRE) && defined(HAVE_SPDIF) |
719 | bool dbg_spdif(void) | 719 | bool dbg_spdif(void) |
720 | { | 720 | { |
721 | char buf[128]; | 721 | char buf[128]; |
@@ -943,7 +943,10 @@ bool dbg_ports(void) | |||
943 | unsigned int gpio1_function; | 943 | unsigned int gpio1_function; |
944 | unsigned int gpio_enable; | 944 | unsigned int gpio_enable; |
945 | unsigned int gpio1_enable; | 945 | unsigned int gpio1_enable; |
946 | int adc_buttons, adc_remote, adc_battery, adc_remotedetect; | 946 | int adc_buttons, adc_remote, adc_battery; |
947 | #ifdef IRIVER | ||
948 | int adc_remotedetect; | ||
949 | #endif | ||
947 | char buf[128]; | 950 | char buf[128]; |
948 | int button; | 951 | int button; |
949 | int line; | 952 | int line; |
@@ -987,16 +990,20 @@ bool dbg_ports(void) | |||
987 | adc_buttons = adc_read(ADC_BUTTONS); | 990 | adc_buttons = adc_read(ADC_BUTTONS); |
988 | adc_remote = adc_read(ADC_REMOTE); | 991 | adc_remote = adc_read(ADC_REMOTE); |
989 | adc_battery = adc_read(ADC_BATTERY); | 992 | adc_battery = adc_read(ADC_BATTERY); |
993 | #ifdef IRIVER | ||
990 | adc_remotedetect = adc_read(ADC_REMOTEDETECT); | 994 | adc_remotedetect = adc_read(ADC_REMOTEDETECT); |
991 | 995 | #endif | |
996 | |||
992 | snprintf(buf, sizeof(buf), "ADC_BUTTONS: %02x", adc_buttons); | 997 | snprintf(buf, sizeof(buf), "ADC_BUTTONS: %02x", adc_buttons); |
993 | lcd_puts(0, line++, buf); | 998 | lcd_puts(0, line++, buf); |
994 | snprintf(buf, sizeof(buf), "ADC_REMOTE: %02x", adc_remote); | 999 | snprintf(buf, sizeof(buf), "ADC_REMOTE: %02x", adc_remote); |
995 | lcd_puts(0, line++, buf); | 1000 | lcd_puts(0, line++, buf); |
996 | snprintf(buf, sizeof(buf), "ADC_BATTERY: %02x", adc_battery); | 1001 | snprintf(buf, sizeof(buf), "ADC_BATTERY: %02x", adc_battery); |
997 | lcd_puts(0, line++, buf); | 1002 | lcd_puts(0, line++, buf); |
1003 | #ifdef IRIVER | ||
998 | snprintf(buf, sizeof(buf), "ADC_REMOTEDETECT: %02x", adc_remotedetect); | 1004 | snprintf(buf, sizeof(buf), "ADC_REMOTEDETECT: %02x", adc_remotedetect); |
999 | lcd_puts(0, line++, buf); | 1005 | lcd_puts(0, line++, buf); |
1006 | #endif | ||
1000 | 1007 | ||
1001 | battery_voltage = (adc_battery * BATTERY_SCALE_FACTOR) / 10000; | 1008 | battery_voltage = (adc_battery * BATTERY_SCALE_FACTOR) / 10000; |
1002 | batt_int = battery_voltage / 100; | 1009 | batt_int = battery_voltage / 100; |
@@ -1006,9 +1013,11 @@ bool dbg_ports(void) | |||
1006 | battery_level()); | 1013 | battery_level()); |
1007 | lcd_puts(0, line++, buf); | 1014 | lcd_puts(0, line++, buf); |
1008 | 1015 | ||
1016 | #ifdef IRIVER | ||
1009 | snprintf(buf, sizeof(buf), "remotetype:: %d", remote_type()); | 1017 | snprintf(buf, sizeof(buf), "remotetype:: %d", remote_type()); |
1010 | lcd_puts(0, line++, buf); | 1018 | lcd_puts(0, line++, buf); |
1011 | 1019 | #endif | |
1020 | |||
1012 | lcd_update(); | 1021 | lcd_update(); |
1013 | button = button_get_w_tmo(HZ/10); | 1022 | button = button_get_w_tmo(HZ/10); |
1014 | 1023 | ||
@@ -1890,6 +1899,8 @@ bool dbg_save_roms(void) | |||
1890 | fd = creat("/internal_rom_000000-1FFFFF.bin", O_WRONLY); | 1899 | fd = creat("/internal_rom_000000-1FFFFF.bin", O_WRONLY); |
1891 | #elif defined(IRIVER_H300_SERIES) | 1900 | #elif defined(IRIVER_H300_SERIES) |
1892 | fd = creat("/internal_rom_000000-3FFFFF.bin", O_WRONLY); | 1901 | fd = creat("/internal_rom_000000-3FFFFF.bin", O_WRONLY); |
1902 | #elif defined(IAUDIO_X5) | ||
1903 | fd = creat("/internal_rom_000000-3FFFFF.bin", O_WRONLY); | ||
1893 | #endif | 1904 | #endif |
1894 | if(fd >= 0) | 1905 | if(fd >= 0) |
1895 | { | 1906 | { |