Driver Library for our displays

Dependents:   dm_bubbles dm_calc dm_paint dm_sdcard_with_adapter ... more

Files at this revision

API Documentation at this revision

Comitter:
embeddedartists
Date:
Tue May 20 12:21:43 2014 +0200
Parent:
1:eab9854e0710
Child:
3:02c19cbc707c
Commit message:
Added common init function

Changed in this revision

DmTftBase.h Show annotated file Show diff for this revision Revisions of this file
DmTftHX8353C.h Show annotated file Show diff for this revision Revisions of this file
DmTftIli9325.h Show annotated file Show diff for this revision Revisions of this file
DmTftIli9341.h Show annotated file Show diff for this revision Revisions of this file
DmTftS6D0164.h Show annotated file Show diff for this revision Revisions of this file
DmTftSsd2119.h Show annotated file Show diff for this revision Revisions of this file
dm_platform.h Show annotated file Show diff for this revision Revisions of this file
--- a/DmTftBase.h	Tue May 13 11:21:11 2014 +0000
+++ b/DmTftBase.h	Tue May 20 12:21:43 2014 +0200
@@ -35,6 +35,8 @@
   DmTftBase(const uint16_t width, const uint16_t height) : _width(width), _height(height){};
   virtual ~DmTftBase() { };
 
+  virtual void init(void) = 0;
+
   uint16_t width() { return _width; }
   uint16_t height() { return _height; }
 
--- a/DmTftHX8353C.h	Tue May 13 11:21:11 2014 +0000
+++ b/DmTftHX8353C.h	Tue May 20 12:21:43 2014 +0200
@@ -20,7 +20,7 @@
 public:
   DmTftHX8353C(uint8_t mosi=D2, uint8_t clk=D3, uint8_t cs=D4, uint8_t dc=D5, uint8_t rst=D6);
   virtual ~DmTftHX8353C();
-  void init(void);
+  virtual void init(void);
 private:
   void send8BitData(uint8_t data);
   void writeBus(uint8_t data);
--- a/DmTftIli9325.h	Tue May 13 11:21:11 2014 +0000
+++ b/DmTftIli9325.h	Tue May 20 12:21:43 2014 +0200
@@ -20,7 +20,7 @@
 public:
   DmTftIli9325(uint8_t wr=A4, uint8_t cs=A3, uint8_t dc=A5, uint8_t rst=A2);
   virtual ~DmTftIli9325();
-  void init(void);
+  virtual void init(void);
 private:
   void send8BitData(uint8_t data);
   void writeBus(uint8_t data);
--- a/DmTftIli9341.h	Tue May 13 11:21:11 2014 +0000
+++ b/DmTftIli9341.h	Tue May 20 12:21:43 2014 +0200
@@ -24,7 +24,7 @@
   DmTftIli9341(uint8_t cs=D10, uint8_t dc=D9, uint8_t miso=D12, uint8_t mosi=D11, uint8_t clk=D13);
 #endif
   virtual ~DmTftIli9341();
-  void init(void);
+  virtual void init(void);
 private:
   void send8BitData(uint8_t data);
   void writeBus(uint8_t data);
--- a/DmTftS6D0164.h	Tue May 13 11:21:11 2014 +0000
+++ b/DmTftS6D0164.h	Tue May 20 12:21:43 2014 +0200
@@ -20,7 +20,7 @@
 public:
   DmTftS6D0164(uint8_t wr=A4, uint8_t cs=A3, uint8_t dc=A5, uint8_t rst=A2);
   virtual ~DmTftS6D0164();
-  void init(void);
+  virtual void init(void);
 private:
   void send8BitData(uint8_t data);
   void writeBus(uint8_t data);
--- a/DmTftSsd2119.h	Tue May 13 11:21:11 2014 +0000
+++ b/DmTftSsd2119.h	Tue May 20 12:21:43 2014 +0200
@@ -24,7 +24,7 @@
   DmTftSsd2119(uint8_t cs=D10, uint8_t dc=D9, uint8_t miso=D12, uint8_t mosi=D11, uint8_t clk=D13);
 #endif
   virtual ~DmTftSsd2119();
-  void init(void);
+  virtual void init(void);
   virtual void setPixel(uint16_t x, uint16_t y, uint16_t color);
 
   virtual void setAddress(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);
--- a/dm_platform.h	Tue May 13 11:21:11 2014 +0000
+++ b/dm_platform.h	Tue May 20 12:21:43 2014 +0200
@@ -12,12 +12,12 @@
 
 // Arduino
 #if defined (DM_TOOLCHAIN_ARDUINO)
-  
+
   // Mandatory includes for Arduino
   #include <Arduino.h>
   #include <avr/pgmspace.h>
   #include <SPI.h>
-  
+
   // Clear bit, Set bit, High pulse and Low pulse macros
   #define cbi(reg, _bitmask) *reg &= ~_bitmask
   #define sbi(reg, _bitmask) *reg |= _bitmask
@@ -36,7 +36,7 @@
   #define A3  17
   #define A4  18
   #define A5  19
-  
+
   // Needed typedefs, not normally present in the Arduino environment
   #ifndef uint8_t
     #define uint8_t unsigned char
@@ -64,7 +64,7 @@
   #define pulse_low(reg, _bitmask) do { *(reg) = 0; *(reg) = 1; } while(0)
   #define constrain(amt,low,high) ((amt)<=(low)?(low):((amt)>(high)?(high):(amt)))
   #define delay(ms) wait_ms(ms)
-  
+
   // Map of mandatory pin names, from Arduino names to D* and A*
   #if defined(__LPC407x_8x_177x_8x_H__)
     #define D0   p10
@@ -81,7 +81,7 @@
     #define D11  p11
     #define D12  p12
     #define D13  p13
-    
+
     #define A0   p15
     #define A1   p16
     #define A2   p17
@@ -89,10 +89,13 @@
     #define A4   p19
     #define A5   p20
   #endif
-  // Special handling for the LPC1549 LPCXpresso board
-#ifdef LPC15XX_H
-  #define D5 P0_11
-#endif
+
+  // Special handling for the LPC1549 LPCXpresso board with solder bump
+  #ifdef LPC15XX_H
+    #define SPECIAL_D5  P0_11
+  #else
+    #define SPECIAL_D5  D5
+  #endif
 #endif
 
 #endif /* DM_PLATFORM_h */