From 140e095c6ec6f96e8b2f4013361aacde306dd280 Mon Sep 17 00:00:00 2001
From: Dirk Eichel <eichel@bytelink.de>
Date: Fri, 1 Mar 2013 17:47:32 +0100
Subject: [PATCH] Add pins for Motherboard variant 64

These definition contain also the definition for the graphics LCD.
---
 Marlin/pins.h | 35 +++++++++++++++++++++++++++--------
 1 file changed, 27 insertions(+), 8 deletions(-)

diff --git a/Marlin/pins.h b/Marlin/pins.h
index 41aae2e221..f1babfa705 100644
--- a/Marlin/pins.h
+++ b/Marlin/pins.h
@@ -644,10 +644,13 @@
 * Sanguinololu pin assignment
 *
 ****************************************************************************************/
+#if MOTHERBOARD == 64
+#define STB
+#endif
 #if MOTHERBOARD == 63
 #define MELZI
 #endif
-#if MOTHERBOARD == 62 || MOTHERBOARD == 63
+#if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64
 #undef MOTHERBOARD
 #define MOTHERBOARD 6
 #define SANGUINOLOLU_V_1_2 
@@ -687,6 +690,10 @@
 #define FAN_PIN            4
 #endif
 
+#ifdef STB
+#define FAN_PIN            4
+#endif
+
 #define PS_ON_PIN          -1
 #define KILL_PIN           -1
 
@@ -727,13 +734,25 @@
      //we have no buzzer installed
      #define BEEPER -1
      //LCD Pins
-     #define LCD_PINS_RS        4
-     #define LCD_PINS_ENABLE    17
-     #define LCD_PINS_D4        30
-     #define LCD_PINS_D5        29
-     #define LCD_PINS_D6        28
-     #define LCD_PINS_D7        27
-     
+	 	 #ifdef DOGLCD
+			 // Pins for DOGM SPI LCD Support
+			 #define DOGLCD_A0	30
+			 #define DOGLCD_CS	29
+			 // GLCD features
+			 #define LCD_CONTRAST 1
+			 // Uncomment screen orientation
+		     // #define LCD_SCREEN_ROT_0
+		     // #define LCD_SCREEN_ROT_90
+			 #define LCD_SCREEN_ROT_180
+		     // #define LCD_SCREEN_ROT_270
+			 #else // standard Hitachi LCD controller
+			 #define LCD_PINS_RS        4
+			 #define LCD_PINS_ENABLE    17
+			 #define LCD_PINS_D4        30
+			 #define LCD_PINS_D5        29
+			 #define LCD_PINS_D6        28
+			 #define LCD_PINS_D7        27
+         #endif
      //The encoder and click button
      #define BTN_EN1 11  //must be a hardware interrupt pin
      #define BTN_EN2 10 //must be hardware interrupt pin