From f96fc52f00533d466b9adc166a59b8420dd54f2b Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Sat, 13 Oct 2007 16:27:41 +0000 Subject: Cleanup more warnings on the M:Robe git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15097 a1c6a512-1295-4272-9138-f99709370657 --- bootloader/mrobe500.c | 73 +++++++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 32 deletions(-) diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c index 5f80d6d6c9..6a31dc22d0 100755 --- a/bootloader/mrobe500.c +++ b/bootloader/mrobe500.c @@ -43,6 +43,10 @@ #include "tsc2100.h" #include "time.h" +//#define MRDEBUG + +#if defined(MRDEBUG) + extern int line; struct touch_calibration_point tl, br; @@ -93,6 +97,41 @@ void touchpad_calibrate_screen(void) set_calibration_points(&tl, &br); } +void mrdebug() +{ + int button=0, *address=0x0; + use_calibration(false); + touchpad_calibrate_screen(); + use_calibration(true); + while(true) + { + struct tm *t = get_time(); + printf("%d:%d:%d %d %d %d", t->tm_hour, t->tm_min, t->tm_sec, t->tm_mday, t->tm_mon, t->tm_year); + printf("time: %d", mktime(t)); + button = button_read_device(); + if (button == BUTTON_POWER) + { + printf("reset"); + IO_GIO_BITSET1|=1<<10; + } + if(button==BUTTON_RC_PLAY) + address+=0x02; + else if (button==BUTTON_RC_DOWN) + address-=0x02; + else if (button==BUTTON_RC_FF) + address+=0x1000; + else if (button==BUTTON_RC_REW) + address-=0x1000; + if (button&BUTTON_TOUCHPAD) + { + unsigned int data = button_get_last_touch(); + printf("x: %d, y: %d", data>>16, data&0xffff); + line-=3; + } + else line -=2; + } +} +#endif void main(void) { @@ -149,38 +188,8 @@ void main(void) reset_screen(); lcd_update(); } -#if 0 - int button=0, *address=0x0, count=0; - use_calibration(false); - touchpad_calibrate_screen(); - use_calibration(true); - while(true) - { - struct tm *t = get_time(); - printf("%d:%d:%d %d %d %d", t->tm_hour, t->tm_min, t->tm_sec, t->tm_mday, t->tm_mon, t->tm_year); - printf("time: %d", mktime(t)); - button = button_read_device(); - if (button == BUTTON_POWER) - { - printf("reset"); - IO_GIO_BITSET1|=1<<10; - } - if(button==BUTTON_RC_PLAY) - address+=0x02; - else if (button==BUTTON_RC_DOWN) - address-=0x02; - else if (button==BUTTON_RC_FF) - address+=0x1000; - else if (button==BUTTON_RC_REW) - address-=0x1000; - if (button&BUTTON_TOUCHPAD) - { - unsigned int data = button_get_last_touch(); - printf("x: %d, y: %d", data>>16, data&0xffff); - line-=3; - } - else line -=2; - } +#if defined(MRDEBUG) + mrdebug(); #endif printf("ATA"); rc = ata_init(); -- cgit v1.2.3