Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 2:004e29745d5e, committed 2015-02-16
- Comitter:
- fblanc
- Date:
- Mon Feb 16 14:03:26 2015 +0000
- Parent:
- 1:a1e34dd1f0a0
- Commit message:
- PULLUP SDA0 SLK0 3.3k 3.3V
Changed in this revision
| TS_I2C.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/TS_I2C.cpp Fri Feb 13 14:34:09 2015 +0000
+++ b/TS_I2C.cpp Mon Feb 16 14:03:26 2015 +0000
@@ -6,12 +6,13 @@
#include "TS.h"
-I2C i2c(P0_10, P0_11);//P0_10 SDA2 P0_11 SCL2
+I2C i2c(P0_10, P0_11);//LPC1768 P0_10 SDA2 P0_11 SCL2 + pull up 3.3k 3.3VCC
+
int TS_Init (void) {
int err=0;
// err+=TS_Write (TS_TSC_CTRL, 0x03); /* TSC_CTRL register X, Y only mode, enable */
-// err+=TS_Write (TS_SYS_CTRL1, 0x02); /* Reset Touch-screen controller */
-// wait_ms(10); /* Wait minimum of 10ms */
+ err+=TS_Write (TS_SYS_CTRL1, 0x02); /* Reset Touch-screen controller */
+ wait_ms(10); /* Wait minimum of 10ms */
err+=TS_Write (TS_SYS_CTRL2, SYS_CTRL2_TS_OFF | SYS_CTRL2_GPIO_OFF); /* 1.Enable TSC and ADC */
err+=TS_Write (TS_INT_EN, INT_TOUCH_DET); /* 2.Enable Touch detect, FIFO */
err+=TS_Write (TS_ADC_CTRL1, 0x69); /* 3.Set sample time , 12-bit mode */