Fork of Silabs MemoryLCD library
Dependents: demoUI whrmDemoUI Host_Software_MAX32664GWEB_HR_EXTENDED Host_Software_MAX32664GWEC_SpO2_HR-_EXTE ... more
C++ library for Sharp Microelectronics 1.28 inch LCD TFT, LS013B7DH03, SPI bus. Forked from Silicon Labs MemoryLCD display driver.
Revision 9:2441ef131ab8, committed 2015-07-30
- Comitter:
- stevew817
- Date:
- Thu Jul 30 09:01:02 2015 +0000
- Parent:
- 8:39206d1e11f7
- Child:
- 10:231fa7861d1f
- Commit message:
- Prevent pixel(..) from writing outside of the framebuffer boundary.
Changed in this revision
| BufferedDisplay.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/BufferedDisplay.cpp Thu Jul 30 08:54:55 2015 +0000
+++ b/BufferedDisplay.cpp Thu Jul 30 09:01:02 2015 +0000
@@ -47,6 +47,7 @@
void BufferedDisplay::pixel(int x, int y, int colour) {
/* Apply constraint to x and y */
if(x < 0 || y < 0) return;
+ if(x >= DISPLAY_WIDTH || y >= DISPLAY_HEIGHT) return;
/*****************************************************************************************************************
* The display expects LSB input, while the SPI is configured for 8bit MSB transfers. Therefore, we should