test STMPE811 I2C +TFT

Dependencies:   mbed TS_STMPE811 GLCD_MCB1700

Files at this revision

API Documentation at this revision

Comitter:
fblanc
Date:
Mon Feb 16 14:03:59 2015 +0000
Parent:
1:eb377b26b700
Commit message:
OK I2C

Changed in this revision

TS_STMPE811.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r eb377b26b700 -r 0fc1974a5fba TS_STMPE811.lib
--- a/TS_STMPE811.lib	Fri Feb 13 14:35:09 2015 +0000
+++ b/TS_STMPE811.lib	Mon Feb 16 14:03:59 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/fblanc/code/TS_STMPE811/#a1e34dd1f0a0
+http://mbed.org/users/fblanc/code/TS_STMPE811/#004e29745d5e
diff -r eb377b26b700 -r 0fc1974a5fba main.cpp
--- a/main.cpp	Fri Feb 13 14:35:09 2015 +0000
+++ b/main.cpp	Mon Feb 16 14:03:59 2015 +0000
@@ -3,9 +3,12 @@
 #include "TS.h"
 #include "GLCD_MCB1700.h"
 #define   TFT 1
+#define   TFT_X 320
+#define   TFT_Y 240
 DigitalOut led1(P1_28);
 DigitalOut led2(P1_29);
 DigitalOut led3(P1_31);
+//LPC1768 I2C P0_10 SDA2 P0_11 SCL2 + pull up 3.3k 3.3VCC
 InterruptIn event(P0_5);//P0_5 INT_TS
 int x,y,z;
 void isr_TSF(void)
@@ -29,10 +32,12 @@
 led2=0;
 led3=0;
 event.mode(PullUp);                              //PULL-UP
-if(TS_Init ())
+if(TS_Init ()){
     led2=1;
+    GLCD_DisplayString  (0, 0, 1, (unsigned char *)"erreur STMPE811");
+    }
 wait(1);
-//event.fall(&isr_TSF);
+event.fall(&isr_TSF);
     while(1) {
 		if(TS_Read (TS_INT_STA, 1)&7){
 			led1=1;