summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2006-02-17 22:38:38 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2006-02-17 22:38:38 +0000
commit00811840c9198833e6b234939b1509d52a51c880 (patch)
tree21659dbffbd8f1714d4c72eddfefa2f938291628 /apps/debug_menu.c
parent5519d82137062f49f264332af329e711299ce6f0 (diff)
downloadrockbox-00811840c9198833e6b234939b1509d52a51c880.tar.gz
rockbox-00811840c9198833e6b234939b1509d52a51c880.zip
Remote type autodetection on iriver, remote_type() returns REMOTETYPE_H100_LCD, REMOTETYPE_H300_LCD or REMOTETYPE_H300_NONLCD
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8721 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 4c36eaa113..267f548d87 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -48,6 +48,7 @@
48#include "screens.h" 48#include "screens.h"
49#include "misc.h" 49#include "misc.h"
50#include "splash.h" 50#include "splash.h"
51#include "lcd-remote.h"
51 52
52#ifdef HAVE_LCD_BITMAP 53#ifdef HAVE_LCD_BITMAP
53#include "widgets.h" 54#include "widgets.h"
@@ -942,7 +943,7 @@ bool dbg_ports(void)
942 unsigned int gpio1_function; 943 unsigned int gpio1_function;
943 unsigned int gpio_enable; 944 unsigned int gpio_enable;
944 unsigned int gpio1_enable; 945 unsigned int gpio1_enable;
945 int adc_buttons, adc_remote, adc_battery; 946 int adc_buttons, adc_remote, adc_battery, adc_remotedetect;
946 char buf[128]; 947 char buf[128];
947 int button; 948 int button;
948 int line; 949 int line;
@@ -986,6 +987,7 @@ bool dbg_ports(void)
986 adc_buttons = adc_read(ADC_BUTTONS); 987 adc_buttons = adc_read(ADC_BUTTONS);
987 adc_remote = adc_read(ADC_REMOTE); 988 adc_remote = adc_read(ADC_REMOTE);
988 adc_battery = adc_read(ADC_BATTERY); 989 adc_battery = adc_read(ADC_BATTERY);
990 adc_remotedetect = adc_read(ADC_REMOTEDETECT);
989 991
990 snprintf(buf, sizeof(buf), "ADC_BUTTONS: %02x", adc_buttons); 992 snprintf(buf, sizeof(buf), "ADC_BUTTONS: %02x", adc_buttons);
991 lcd_puts(0, line++, buf); 993 lcd_puts(0, line++, buf);
@@ -993,6 +995,8 @@ bool dbg_ports(void)
993 lcd_puts(0, line++, buf); 995 lcd_puts(0, line++, buf);
994 snprintf(buf, sizeof(buf), "ADC_BATTERY: %02x", adc_battery); 996 snprintf(buf, sizeof(buf), "ADC_BATTERY: %02x", adc_battery);
995 lcd_puts(0, line++, buf); 997 lcd_puts(0, line++, buf);
998 snprintf(buf, sizeof(buf), "ADC_REMOTEDETECT: %02x", adc_remotedetect);
999 lcd_puts(0, line++, buf);
996 1000
997 battery_voltage = (adc_battery * BATTERY_SCALE_FACTOR) / 10000; 1001 battery_voltage = (adc_battery * BATTERY_SCALE_FACTOR) / 10000;
998 batt_int = battery_voltage / 100; 1002 batt_int = battery_voltage / 100;
@@ -1002,6 +1006,9 @@ bool dbg_ports(void)
1002 battery_level()); 1006 battery_level());
1003 lcd_puts(0, line++, buf); 1007 lcd_puts(0, line++, buf);
1004 1008
1009 snprintf(buf, sizeof(buf), "remotetype:: %d", remote_type());
1010 lcd_puts(0, line++, buf);
1011
1005 lcd_update(); 1012 lcd_update();
1006 button = button_get_w_tmo(HZ/10); 1013 button = button_get_w_tmo(HZ/10);
1007 1014