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)
Revision 141:2ec78a50dc98, committed 2016-12-29
- Comitter:
- WiredHome
- Date:
- Thu Dec 29 20:06:00 2016 +0000
- Parent:
- 140:33ca352755a2
- Child:
- 142:6e9bff59878a
- Child:
- 145:5eb2492acdda
- Commit message:
- Minor change from sprintf to snprintf in a couple of locations.
Changed in this revision
RA8875.cpp | Show annotated file Show diff for this revision Revisions of this file |
TextDisplay.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/RA8875.cpp Tue Dec 27 15:46:18 2016 +0000 +++ b/RA8875.cpp Thu Dec 29 20:06:00 2016 +0000 @@ -2505,7 +2505,7 @@ display.puts("RA8875 Backlight Test - Ramp up."); wait_ms(delay); for (int i=0; i <= 255; i++) { - sprintf(buf, "%3d, %4d", i, w); + snprintf(buf, sizeof(buf), "%3d, %4d", i, w); display.puts(100,100,buf); display.Backlight_u8(i); wait_ms(w);
--- a/TextDisplay.cpp Tue Dec 27 15:46:18 2016 +0000 +++ b/TextDisplay.cpp Thu Dec 29 20:06:00 2016 +0000 @@ -26,8 +26,9 @@ if (name == NULL) { _path = NULL; } else { - _path = new char[strlen(name) + 2]; - sprintf(_path, "/%s", name); + int len = strlen(name) + 2; + _path = new char[len]; + snprintf(_path, len, "/%s", name); } }