diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-09-30 11:15:14 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-09-30 11:15:14 +0000 |
commit | e108964ec08f70a46e1db430288283d68a906c56 (patch) | |
tree | 22c789576822138974a2c171f7c648cc3a1d99b1 /bootloader | |
parent | ef1c52fa4390075000db585e5833324b38329f40 (diff) | |
download | rockbox-e108964ec08f70a46e1db430288283d68a906c56.tar.gz rockbox-e108964ec08f70a46e1db430288283d68a906c56.zip |
IRQ driven touchpad driver, crude but working
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14914 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
-rwxr-xr-x | bootloader/mrobe500.c | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c index ce1aa57224..b92096ada2 100755 --- a/bootloader/mrobe500.c +++ b/bootloader/mrobe500.c @@ -104,8 +104,6 @@ void main(void) while(true)
{
button = button_read_device();
- if (button)
- printf("btn: %x", button);
if (button == BUTTON_POWER)
{
printf("reset");
@@ -119,23 +117,28 @@ void main(void) address+=0x1000;
else if (button==BUTTON_RC_REW)
address-=0x1000;
-
- // if ((IO_GIO_BITSET0&(1<<14) == 0)
+ if (button&BUTTON_TOUCHPAD)
{
- short x,y,z1,z2, reg;
- extern int uart1count;
- tsc2100_read_values(&x, &y, &z1, &z2);
- printf("x: %04x y: %04x z1: %04x z2: %04x", x, y, z1, z2);
- printf("tsadc: %4x", tsc2100_readreg(TSADC_PAGE, TSADC_ADDRESS)&0xffff);
- printf("current tick: %04x", current_tick);
- printf("Address: 0x%08x Data: 0x%08x", address, *address);
- printf("Address: 0x%08x Data: 0x%08x", address+1, *(address+1));
- printf("Address: 0x%08x Data: 0x%08x", address+2, *(address+2));
- printf("uart1count: %d", uart1count);
- printf("%x %x", IO_UART1_RFCR & 0x3f, IO_UART1_DTRR & 0xff);
- tsc2100_keyclick(); /* doesnt work :( */
- line -= 8;
+ int touch = button_get_last_touch();
+ printf("x: %d, y: %d", (touch>>16), touch&0xffff);
+ line--;
}
+// if ((IO_GIO_BITSET0&(1<<14) == 0)
+// {
+// short x,y,z1,z2, reg;
+// extern int uart1count;
+// tsc2100_read_values(&x, &y, &z1, &z2);
+// printf("x: %04x y: %04x z1: %04x z2: %04x", x, y, z1, z2);
+// printf("tsadc: %4x", tsc2100_readreg(TSADC_PAGE, TSADC_ADDRESS)&0xffff);
+// printf("current tick: %04x", current_tick);
+// printf("Address: 0x%08x Data: 0x%08x", address, *address);
+// printf("Address: 0x%08x Data: 0x%08x", address+1, *(address+1));
+// printf("Address: 0x%08x Data: 0x%08x", address+2, *(address+2));
+// printf("uart1count: %d", uart1count);
+// printf("%x %x", IO_UART1_RFCR & 0x3f, IO_UART1_DTRR & 0xff);
+// tsc2100_keyclick(); /* doesnt work :( */
+// line -= 8;
+// }
}
#endif
printf("ATA");
|