Fixed Touchscreen Lib

Changed example to use the Touchscreen Library that has STM32 support.
This commit is contained in:
Jaret Burkett 2015-09-26 09:21:41 -05:00
parent 664c8c5981
commit 7f23ee129c
1 changed files with 10 additions and 10 deletions

View File

@ -15,22 +15,22 @@
/** NOT FOR USE WITH THE TOUCH SHIELD, ONLY FOR THE BREAKOUT! **/ /** NOT FOR USE WITH THE TOUCH SHIELD, ONLY FOR THE BREAKOUT! **/
#include <Adafruit_GFX.h> // Core graphics library #include <Adafruit_GFX_AS.h> // Core graphics library
#include <SPI.h> #include <SPI.h>
#include <Adafruit_ILI9341_STM.h> #include <Adafruit_ILI9341_STM.h>
#include "TouchScreen.h" #include <TouchScreen_STM.h>
// These are the four touchscreen analog pins // These are the four touchscreen analog pins
#define YP A2 // must be an analog pin, use "An" notation! #define YP PB0 // must be an analog pin
#define XM A3 // must be an analog pin, use "An" notation! #define XM PA3 // must be an analog pin
#define YM 5 // can be a digital pin #define YM PB7 // can be a digital pin
#define XP 4 // can be a digital pin #define XP PC13 // can be a digital pin
// This is calibration data for the raw touch data to the screen coordinates // This is calibration data for the raw touch data to the screen coordinates
#define TS_MINX 150 #define TS_MINX 3670
#define TS_MINY 120 #define TS_MINY 3790
#define TS_MAXX 920 #define TS_MAXX 640
#define TS_MAXY 940 #define TS_MAXY 300
#define MINPRESSURE 10 #define MINPRESSURE 10
#define MAXPRESSURE 1000 #define MAXPRESSURE 1000