diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2008-04-15 10:35:11 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2008-04-15 10:35:11 +0000 |
commit | 5b5a626bb6ba54ccdcd90741cea5f9cbd0f79553 (patch) | |
tree | 0bf60b83aad534757330162ad4f683f142955ccb /bootloader/mrobe500.c | |
parent | 50851794a6bdd585ce70ecb430b1f798fb90936b (diff) |
Setup the touchpads to have two modes - stylus and button - and set them in button mode by default.
in button mode the touchpad is split into a 3x3 grid for 9 seperate buttons which can be used by the action system like real buttons.
Unify the keymap file for the touchpads in button mode. the target keymap file only needs to worry about real buttons.
(As these ports mature each screen will need to be fixed seperatly to be able to use stylus mode (the lists can already but don't change mode just yet.)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17114 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/mrobe500.c')
-rwxr-xr-x | bootloader/mrobe500.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c index e6dc58118d..5958396188 100755 --- a/bootloader/mrobe500.c +++ b/bootloader/mrobe500.c @@ -117,7 +117,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_get(false);
+ button = button_get(false);
if (button == BUTTON_POWER)
{
printf("reset");
@@ -143,8 +143,18 @@ void mrdebug(void) // // tsc2100_keyclick(); /* doesnt work :( */
// line -= 6;
// }
+ else if (button == BUTTON_RC_HEART)
+ {
+ printf("POINT");
+ touchpad_set_mode(TOUCHPAD_POINT);
+ }
+ else if (button == BUTTON_RC_MODE)
+ {
+ printf("BUTTON");
+ touchpad_set_mode(TOUCHPAD_BUTTON);
+ }
#if 1
- if (button&BUTTON_TOUCHPAD)
+ else if (button&BUTTON_TOUCHPAD)
{
if (button&BUTTON_REL)
continue;
@@ -152,11 +162,24 @@ void mrdebug(void) int x = (data&0xffff0000)>>16, y = data&0x0000ffff;
reset_screen();
line = 9;
- printf("%x %d %d\n", button, x,y);
+ printf("BB: %x %d %d", button, x,y);
lcd_hline(x-5, x+5, y);
lcd_vline(x, y-5, y+5);
lcd_update();
}
+ else if (button == BUTTON_RC_PLAY)
+ {
+ reset_screen();
+ }
+
+ else if (button)
+ {
+ // if (button&BUTTON_REL)
+ {
+ printf("%08x %s\n", button, (button&BUTTON_REL)?"yes":"no");
+ }
+ }
+
#endif
}
}
|