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.
Diff: BufferedDisplay.cpp
- Revision:
- 9:2441ef131ab8
- Parent:
- 8:39206d1e11f7
- Child:
- 10:231fa7861d1f
diff -r 39206d1e11f7 -r 2441ef131ab8 BufferedDisplay.cpp --- 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