From d8667df35731bad09dcdbc19a8239bf8b131114f Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 18 Oct 2007 12:15:56 +0000 Subject: slightly better touchpad driver. Still not brilliant, but the bootloader/debugger can follow a stylus with a cursor, so we can start work on getting apps/ working git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15187 a1c6a512-1295-4272-9138-f99709370657 --- bootloader/mrobe500.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'bootloader') diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c index 2ea9a18..c051e54 100755 --- a/bootloader/mrobe500.c +++ b/bootloader/mrobe500.c @@ -112,7 +112,7 @@ void mrdebug(void) 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)); #endif - button = button_status(); + button = button_get(false); if (button == BUTTON_POWER) { printf("reset"); @@ -138,14 +138,16 @@ void mrdebug(void) // tsc2100_keyclick(); /* doesnt work :( */ line -= 6; } -#if 0 +#if 1 if (button&BUTTON_TOUCHPAD) { - unsigned int data = button_get_last_touch(); - printf("x: %d, y: %d", data>>16, data&0xffff); - line-=3; + unsigned int data = button_get_data(); + int x = (data&0xffff0000)>>16, y = data&0x0000ffff; + reset_screen(); + lcd_hline(x-5, x+5, y); + lcd_vline(x, y-5, y+5); + lcd_update(); } - else line -=2; #endif } } -- cgit v1.1