seed
Fork of SeeedStudioTFTv2 by
Diff: SeeedStudioTFTv2.h
- Revision:
- 14:304b55ac904b
- Parent:
- 8:36ea6be5182e
- Child:
- 15:23288c15e11d
--- a/SeeedStudioTFTv2.h Tue May 06 18:12:49 2014 +0000 +++ b/SeeedStudioTFTv2.h Mon Apr 18 06:59:46 2016 +0000 @@ -16,9 +16,6 @@ #include "mbed.h" #include "SPI_TFT_ILI9341.h" -#ifdef USE_SDCARD -#include "SDFileSystem.h" // import the SDFileSystem library -#endif struct point { int x; @@ -26,9 +23,6 @@ }; class SeeedStudioTFTv2 : public -#ifdef USE_SDCARD - SDFileSystem, -#endif SPI_TFT_ILI9341 { public: @@ -45,10 +39,8 @@ */ SeeedStudioTFTv2(PinName xp, PinName xm, PinName yp, PinName ym, PinName mosi, PinName miso, PinName sclk, - PinName csTft, PinName dcTft, PinName blTft, - PinName csSd); + PinName csTft, PinName rstTft, PinName dcTft); - void setBacklight(bool enabled); /** calibrate the touch display * @@ -60,8 +52,7 @@ * * @returns point(x,y) */ - bool - getPixel(point& p); + bool getPixel(point& p); /** calculate coord on screen * @@ -70,20 +61,30 @@ * */ point toPixel(point p); - + + /* Ecrit les paramètres de calibrage dans un fichier à la racine du LPC*/ + + void Ecrire_Calibration(unsigned short x_off, unsigned short y_off, unsigned short pp_tx, unsigned short pp_ty); + + /*Lit les paramètres de calibrage*/ + + void Lire_Calibration(void); + + /*Lance le calibrage s'il n'y a pas de fichier sinon lit le calibrage enregistré*/ + + void CheckCalibTXT(void); + + typedef enum { YES, MAYBE, NO } TOUCH; + TOUCH getTouch(point& p); + int readTouch(PinName p, PinName m, PinName a, PinName i); + int x_off,y_off; + int pp_tx,pp_ty; + protected: PinName _xm; PinName _ym; PinName _xp; - PinName _yp; - DigitalOut bl; - - typedef enum { YES, MAYBE, NO } TOUCH; - TOUCH getTouch(point& p); - int readTouch(PinName p, PinName m, PinName a, PinName i); - - int x_off,y_off; - int pp_tx,pp_ty; + PinName _yp; }; #endif