summaryrefslogtreecommitdiff
path: root/bootloader/mrobe500.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-04-15 10:35:11 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-04-15 10:35:11 +0000
commit5b5a626bb6ba54ccdcd90741cea5f9cbd0f79553 (patch)
tree0bf60b83aad534757330162ad4f683f142955ccb /bootloader/mrobe500.c
parent50851794a6bdd585ce70ecb430b1f798fb90936b (diff)
downloadrockbox-5b5a626bb6ba54ccdcd90741cea5f9cbd0f79553.tar.gz
rockbox-5b5a626bb6ba54ccdcd90741cea5f9cbd0f79553.zip
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-xbootloader/mrobe500.c29
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)
117 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); 117 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);
118 printf("time: %d", mktime(t)); 118 printf("time: %d", mktime(t));
119#endif 119#endif
120 button = button_get(false); 120 button = button_get(false);
121 if (button == BUTTON_POWER) 121 if (button == BUTTON_POWER)
122 { 122 {
123 printf("reset"); 123 printf("reset");
@@ -143,8 +143,18 @@ void mrdebug(void)
143// // tsc2100_keyclick(); /* doesnt work :( */ 143// // tsc2100_keyclick(); /* doesnt work :( */
144// line -= 6; 144// line -= 6;
145// } 145// }
146 else if (button == BUTTON_RC_HEART)
147 {
148 printf("POINT");
149 touchpad_set_mode(TOUCHPAD_POINT);
150 }
151 else if (button == BUTTON_RC_MODE)
152 {
153 printf("BUTTON");
154 touchpad_set_mode(TOUCHPAD_BUTTON);
155 }
146#if 1 156#if 1
147 if (button&BUTTON_TOUCHPAD) 157 else if (button&BUTTON_TOUCHPAD)
148 { 158 {
149 if (button&BUTTON_REL) 159 if (button&BUTTON_REL)
150 continue; 160 continue;
@@ -152,11 +162,24 @@ void mrdebug(void)
152 int x = (data&0xffff0000)>>16, y = data&0x0000ffff; 162 int x = (data&0xffff0000)>>16, y = data&0x0000ffff;
153 reset_screen(); 163 reset_screen();
154 line = 9; 164 line = 9;
155 printf("%x %d %d\n", button, x,y); 165 printf("BB: %x %d %d", button, x,y);
156 lcd_hline(x-5, x+5, y); 166 lcd_hline(x-5, x+5, y);
157 lcd_vline(x, y-5, y+5); 167 lcd_vline(x, y-5, y+5);
158 lcd_update(); 168 lcd_update();
159 } 169 }
170 else if (button == BUTTON_RC_PLAY)
171 {
172 reset_screen();
173 }
174
175 else if (button)
176 {
177 // if (button&BUTTON_REL)
178 {
179 printf("%08x %s\n", button, (button&BUTTON_REL)?"yes":"no");
180 }
181 }
182
160#endif 183#endif
161 } 184 }
162} 185}