diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-10-22 07:01:59 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-10-22 07:01:59 +0000 |
commit | 12d1ff912c1f1d292bf91f29f7896882360424aa (patch) | |
tree | 968cdb858a05303a1474207244110c623bce5438 /bootloader/mrobe500.c | |
parent | e49ab427f035af3a3e6f15e56fc839836533f23e (diff) | |
download | rockbox-12d1ff912c1f1d292bf91f29f7896882360424aa.tar.gz rockbox-12d1ff912c1f1d292bf91f29f7896882360424aa.zip |
touchpad driver for the mrobe. nothing in apps/ uses it yet.
Changes to button driver: HAVE_BUTTON_DATA targets pass the button data straight back in the button_read_device() call
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15262 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/mrobe500.c')
-rwxr-xr-x | bootloader/mrobe500.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c index fe48ac6a95..a3317f69a4 100755 --- a/bootloader/mrobe500.c +++ b/bootloader/mrobe500.c | |||
@@ -48,7 +48,7 @@ | |||
48 | #if defined(MRDEBUG) | 48 | #if defined(MRDEBUG) |
49 | 49 | ||
50 | extern int line; | 50 | extern int line; |
51 | 51 | #if 0 | |
52 | struct touch_calibration_point tl, br; | 52 | struct touch_calibration_point tl, br; |
53 | 53 | ||
54 | void touchpad_get_one_point(struct touch_calibration_point *p) | 54 | void touchpad_get_one_point(struct touch_calibration_point *p) |
@@ -96,7 +96,7 @@ void touchpad_calibrate_screen(void) | |||
96 | line++; | 96 | line++; |
97 | set_calibration_points(&tl, &br); | 97 | set_calibration_points(&tl, &br); |
98 | } | 98 | } |
99 | 99 | #endif | |
100 | void mrdebug(void) | 100 | void mrdebug(void) |
101 | { | 101 | { |
102 | int button=0, *address=0x0; | 102 | int button=0, *address=0x0; |
@@ -126,24 +126,28 @@ void mrdebug(void) | |||
126 | address+=0x1000; | 126 | address+=0x1000; |
127 | else if (button==BUTTON_RC_REW) | 127 | else if (button==BUTTON_RC_REW) |
128 | address-=0x1000; | 128 | address-=0x1000; |
129 | { | 129 | // { |
130 | short x,y,z1,z2; | 130 | // short x,y,z1,z2; |
131 | tsc2100_read_values(&x, &y, &z1, &z2); | 131 | // tsc2100_read_values(&x, &y, &z1, &z2); |
132 | printf("x: %04x y: %04x z1: %04x z2: %04x", x, y, z1, z2); | 132 | // printf("x: %04x y: %04x z1: %04x z2: %04x", x, y, z1, z2); |
133 | printf("tsadc: %4x", tsc2100_readreg(TSADC_PAGE, TSADC_ADDRESS)&0xffff); | 133 | // printf("tsadc: %4x", tsc2100_readreg(TSADC_PAGE, TSADC_ADDRESS)&0xffff); |
134 | printf("current tick: %04x", current_tick); | 134 | // printf("current tick: %04x", current_tick); |
135 | printf("Address: 0x%08x Data: 0x%08x", address, *address); | 135 | // printf("Address: 0x%08x Data: 0x%08x", address, *address); |
136 | printf("Address: 0x%08x Data: 0x%08x", address+1, *(address+1)); | 136 | // printf("Address: 0x%08x Data: 0x%08x", address+1, *(address+1)); |
137 | printf("Address: 0x%08x Data: 0x%08x", address+2, *(address+2)); | 137 | // printf("Address: 0x%08x Data: 0x%08x", address+2, *(address+2)); |
138 | // tsc2100_keyclick(); /* doesnt work :( */ | 138 | // // tsc2100_keyclick(); /* doesnt work :( */ |
139 | line -= 6; | 139 | // line -= 6; |
140 | } | 140 | // } |
141 | #if 1 | 141 | #if 1 |
142 | if (button&BUTTON_TOUCHPAD) | 142 | if (button&BUTTON_TOUCHPAD) |
143 | { | 143 | { |
144 | if (button&BUTTON_REL) | ||
145 | continue; | ||
144 | unsigned int data = button_get_data(); | 146 | unsigned int data = button_get_data(); |
145 | int x = (data&0xffff0000)>>16, y = data&0x0000ffff; | 147 | int x = (data&0xffff0000)>>16, y = data&0x0000ffff; |
146 | reset_screen(); | 148 | reset_screen(); |
149 | line = 9; | ||
150 | printf("%x %d %d\n", button, x,y); | ||
147 | lcd_hline(x-5, x+5, y); | 151 | lcd_hline(x-5, x+5, y); |
148 | lcd_vline(x, y-5, y+5); | 152 | lcd_vline(x, y-5, y+5); |
149 | lcd_update(); | 153 | lcd_update(); |