Driver Library for our displays

Dependents:   dm_bubbles dm_calc dm_paint dm_sdcard_with_adapter ... more

Revision:
7:6cd8c36cbdb3
Parent:
0:d6ff5fa503e8
--- a/DmTftBase.cpp	Fri May 23 08:10:09 2014 +0000
+++ b/DmTftBase.cpp	Fri Jul 04 09:26:32 2014 +0000
@@ -33,6 +33,10 @@
 void DmTftBase::setPixel(uint16_t x, uint16_t y, uint16_t color) {
   cbi(_pinCS, _bitmaskCS);
 
+  if ((x >= _width) || (y >= _height)) {
+    return;
+  }
+
   setAddress(x, y, x, y);
 
   sendData(color);