From 424101110c2d3907722bbabef0b4ceb2178b3553 Mon Sep 17 00:00:00 2001
From: Bas Spaans <bas.spaans@gmail.com>
Date: Sun, 19 May 2013 12:04:26 +0200
Subject: [PATCH] Add Panelolu2 support for Melzi

---
 Marlin/pins.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Marlin/pins.h b/Marlin/pins.h
index c8275e4773..36f6703743 100644
--- a/Marlin/pins.h
+++ b/Marlin/pins.h
@@ -735,7 +735,16 @@
      //The encoder and click button
      #define BTN_EN1 11  
      #define BTN_EN2 10 
-     #define BTN_ENC 16  //the switch
+     #ifdef LCD_I2C_PANELOLU2
+       #ifdef MELZI
+         #define BTN_ENC 29 //the click switch
+         #define SDSS 30 //to use the SD card reader on the Panelolu2 rather than the melzi board
+       #else
+         #define BTN_ENC 30 //the click switch
+       #endif
+     #else
+       #define BTN_ENC 16  //the click switch
+     #endif //Panelolu2
      //not connected to a pin
      #define SDCARDDETECT -1