diff options
Diffstat (limited to 'firmware/target/arm/tms320dm320/mrobe-500/adc-mr500.c')
-rw-r--r-- | firmware/target/arm/tms320dm320/mrobe-500/adc-mr500.c | 15 |
1 files 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 @@ | |||
24 | #include "adc-target.h" | 24 | #include "adc-target.h" |
25 | #include "kernel.h" | 25 | #include "kernel.h" |
26 | #include "tsc2100.h" | 26 | #include "tsc2100.h" |
27 | #include "system-target.h" | ||
27 | #include "button-target.h" | 28 | #include "button-target.h" |
28 | 29 | ||
29 | void adc_init(void) | 30 | void adc_init(void) |
@@ -32,10 +33,16 @@ void adc_init(void) | |||
32 | * touchscreen does not work, audio has not been tested, but it is | 33 | * touchscreen does not work, audio has not been tested, but it is |
33 | * expected that is will also not work when low. | 34 | * expected that is will also not work when low. |
34 | */ | 35 | */ |
35 | IO_GIO_DIR0 &= ~(1<<15); /* output */ | 36 | |
36 | IO_GIO_INV0 &= ~(1<<15); /* non-inverted */ | 37 | /* Setup touchscreen (tsc2100) pins: |
37 | IO_GIO_FSEL0 &= ~(0x03<<12); /* normal pin */ | 38 | * 14 - input, touchscreen irq |
38 | IO_GIO_BITSET0 = (1<<15); | 39 | * 15 - output, touchscreen nPWD? */ |
40 | /* 14: input , non-inverted, irq, falling edge, no-chat, normal */ | ||
41 | dm320_set_io(14, true, false, true, false, false, 0x00); | ||
42 | |||
43 | /* 15: output, non-inverted, no-irq, falling edge, no-chat, normal */ | ||
44 | dm320_set_io(15, false, false, false, false, false, 0x00); | ||
45 | IO_GIO_BITSET0 = (1<<15); /* Turn on TSC2100 */ | ||
39 | 46 | ||
40 | /* Initialize the touchscreen and the battery readout */ | 47 | /* Initialize the touchscreen and the battery readout */ |
41 | tsc2100_adc_init(); | 48 | tsc2100_adc_init(); |