Library to control a Graphics TFT connected to 4-wire SPI - revised for the Raio RA8875 Display Controller.
Dependents: FRDM_RA8875_mPaint RA8875_Demo RA8875_KeyPadDemo SignalGenerator ... more
Fork of SPI_TFT by
See Components - RA8875 Based Display
Enhanced touch-screen support - where it previous supported both the Resistive Touch and Capacitive Touch based on the FT5206 Touch Controller, now it also has support for the GSL1680 Touch Controller.
Offline Help Manual (Windows chm)
/media/uploads/WiredHome/ra8875.zip.bin (download, rename to .zip and unzip)
Diff: RA8875.h
- Revision:
- 154:ad2450fc3dc3
- Parent:
- 153:8a85efb3eb71
- Child:
- 155:b3f225ae572c
diff -r 8a85efb3eb71 -r ad2450fc3dc3 RA8875.h --- a/RA8875.h Sun Jul 29 00:32:51 2018 +0000 +++ b/RA8875.h Fri Aug 17 01:29:06 2018 +0000 @@ -424,7 +424,7 @@ /// This constructor differs from the alternate by supportting /// either No Touch Screen, or the RA8875 built-in resistive /// touch screen. If the application requires the use of the - /// capacitive touchscreen, the alternate constructor should + /// capacitive touchscreen, the alternate constructor must /// be used. /// /// This configures the registers and calls the @ref init method. @@ -2337,6 +2337,52 @@ /// outside of this API. /// /// @code + /// // Calibrate the resistive touch screen, and store the data on the + /// // local file system. + /// // + /// void CalibrateTS(void) + /// { + /// FILE * fh; + /// tpMatrix_t matrix; + /// RetCode_t r; + /// Timer testperiod; + /// + /// r = lcd.TouchPanelCalibrate("Calibrate the touch panel", &matrix); + /// if (r == noerror) { + /// fh = fopen("/local/tpcal.cfg", "wb"); + /// if (fh) { + /// fwrite(&matrix, sizeof(tpMatrix_t), 1, fh); + /// fclose(fh); + /// printf(" tp cal written.\r\n"); + /// lcd.cls(); + /// } else { + /// printf(" couldn't open tpcal file.\r\n"); + /// } + /// } else { + /// printf("error return: %d\r\n", r); + /// } + /// lcd.cls(); + /// } + /// + /// // Try to load a previous resistive touch screen calibration from storage. If it + /// // doesn't exist, activate the touch screen calibration process. + /// // + /// void InitTS(void) + /// { + /// FILE * fh; + /// tpMatrix_t matrix; + /// + /// fh = fopen("/local/tpcal.cfg", "rb"); + /// if (fh) { + /// fread(&matrix, sizeof(tpMatrix_t), 1, fh); + /// fclose(fh); + /// lcd.TouchPanelSetMatrix(&matrix); + /// printf(" tp cal loaded.\r\n"); + /// } else { + /// CalibrateTS(); + /// } + /// } + /// /// int main() /// { /// point_t src;