Driver Library for our displays

Dependents:   dm_bubbles dm_calc dm_paint dm_sdcard_with_adapter ... more

Revision:
14:2db7065edbec
Parent:
0:d6ff5fa503e8
--- a/DmTftHX8353C.cpp	Fri Sep 18 14:59:13 2015 +0000
+++ b/DmTftHX8353C.cpp	Mon Oct 12 08:35:35 2015 +0000
@@ -10,9 +10,15 @@
  NO RESPONSIBILITY OR LIABILITY FOR THE USE OF THE SOFTWARE.
  ********************************************************************************************/
 
-#include "DmTftHX8353C.h"
+ //Tested on NUCLEO-F401RE, LPCXpresso11U68 platform.
 
-DmTftHX8353C::DmTftHX8353C(uint8_t mosi, uint8_t clk, uint8_t cs, uint8_t dc, uint8_t rst) : DmTftBase(128,160) {
+#include "DmTftHX8353C.h"
+#if defined (DM_TOOLCHAIN_ARDUINO)
+DmTftHX8353C::DmTftHX8353C(uint8_t mosi, uint8_t clk, uint8_t cs, uint8_t dc, uint8_t rst) : DmTftBase(128,160) 
+#elif defined (DM_TOOLCHAIN_MBED)
+DmTftHX8353C::DmTftHX8353C(PinName mosi, PinName clk, PinName cs, PinName dc, PinName rst) : DmTftBase(128,160) 
+#endif
+{
   _mosi = mosi;
   _clk = clk;
   _cs = cs;
@@ -150,11 +156,11 @@
   pinMode(_dc,OUTPUT);
   pinMode(_rst,OUTPUT);
 #elif defined (DM_TOOLCHAIN_MBED)
-  _pinMOSI = new DigitalOut((PinName)_mosi);
-  _pinCLK = new DigitalOut((PinName)_clk);
-  _pinCS = new DigitalOut((PinName)_cs);
-  _pinDC = new DigitalOut((PinName)_dc);
-  _pinRST = new DigitalOut((PinName)_rst);
+  _pinMOSI = new DigitalOut(_mosi);
+  _pinCLK = new DigitalOut(_clk);
+  _pinCS = new DigitalOut(_cs);
+  _pinDC = new DigitalOut(_dc);
+  _pinRST = new DigitalOut(_rst);
 #endif
 
   sbi(_pinRST, _bitmaskRST);