From 2b57fc434c4adfa996712e9d88779c9ccb0ecfab Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Mon, 14 Dec 2009 07:18:55 +0000 Subject: M:Robe 500: Initialize TSC2100 pins with pin setup function git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23989 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/tms320dm320/mrobe-500/adc-mr500.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/firmware/target/arm/tms320dm320/mrobe-500/adc-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/adc-mr500.c index 2acce7a695..11153f10d0 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/adc-mr500.c +++ b/firmware/target/arm/tms320dm320/mrobe-500/adc-mr500.c @@ -24,6 +24,7 @@ #include "adc-target.h" #include "kernel.h" #include "tsc2100.h" +#include "system-target.h" #include "button-target.h" void adc_init(void) @@ -32,10 +33,16 @@ void adc_init(void) * touchscreen does not work, audio has not been tested, but it is * expected that is will also not work when low. */ - IO_GIO_DIR0 &= ~(1<<15); /* output */ - IO_GIO_INV0 &= ~(1<<15); /* non-inverted */ - IO_GIO_FSEL0 &= ~(0x03<<12); /* normal pin */ - IO_GIO_BITSET0 = (1<<15); + + /* Setup touchscreen (tsc2100) pins: + * 14 - input, touchscreen irq + * 15 - output, touchscreen nPWD? */ + /* 14: input , non-inverted, irq, falling edge, no-chat, normal */ + dm320_set_io(14, true, false, true, false, false, 0x00); + + /* 15: output, non-inverted, no-irq, falling edge, no-chat, normal */ + dm320_set_io(15, false, false, false, false, false, 0x00); + IO_GIO_BITSET0 = (1<<15); /* Turn on TSC2100 */ /* Initialize the touchscreen and the battery readout */ tsc2100_adc_init(); -- cgit v1.2.3