From 00dbf69b6d7d325a9f7bdb0664fdc5bcbea77235 Mon Sep 17 00:00:00 2001 From: AndySze Date: Thu, 23 Jul 2015 16:12:19 +0800 Subject: [PATCH] add MINIPANEL defines --- Marlin/Conditionals.h | 8 +++++++ Marlin/Configuration.h | 4 ++++ Marlin/dogm_lcd_implementation.h | 8 +++++-- .../SCARA/Configuration.h | 4 ++++ .../delta/generic/Configuration.h | 4 ++++ Marlin/pins_RAMPS_13.h | 21 +++++++++++++++++++ 6 files changed, 47 insertions(+), 2 deletions(-) diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals.h index f31ffcd40..d769b89da 100644 --- a/Marlin/Conditionals.h +++ b/Marlin/Conditionals.h @@ -75,6 +75,14 @@ #define NEWPANEL #endif + #ifdef MINIPANEL + #define DOGLCD + #define SDSUPPORT + #define ULTIPANEL + #define NEWPANEL + #define DEFAULT_LCD_CONTRAST 17 + #endif + /** * I2C PANELS */ diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 7d06e2179..161e2eb64 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -694,6 +694,10 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C //#define RA_CONTROL_PANEL +// The MakerLab Mini Panel with graphic controller and SD support +// http://reprap.org/wiki/Mini_panel +// #define MINIPANEL + /** * I2C Panels */ diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index 1e58f03f6..3fa9c33b1 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -128,6 +128,9 @@ #elif defined U8GLIB_SSD1306 // Generic support for SSD1306 OLED I2C LCDs U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); +#elif defined(MINIPANEL) + // The MINIPanel display + U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0); #else // for regular DOGM128 display with HW-SPI U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0 @@ -201,8 +204,9 @@ static void lcd_implementation_init() { pinMode(LCD_PIN_RESET, OUTPUT); digitalWrite(LCD_PIN_RESET, HIGH); #endif - - u8g.setContrast(lcd_contrast); + #ifndef MINIPANEL//setContrast not working for Mini Panel + u8g.setContrast(lcd_contrast); + #endif // FIXME: remove this workaround // Uncomment this if you have the first generation (V1.10) of STBs board // pinMode(17, OUTPUT); // Enable LCD backlight diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index e0f79a9e4..2f5aa56e1 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -702,6 +702,10 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C //#define RA_CONTROL_PANEL +// The MakerLab Mini Panel with graphic controller and SD support +// http://reprap.org/wiki/Mini_panel +// #define MINIPANEL + /** * I2C Panels */ diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index c9560f15c..651e6ce9b 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -821,6 +821,10 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic // in ultralcd.cpp@lcd_delta_calibrate_menu() // #define DELTA_CALIBRATION_MENU +// The MakerLab Mini Panel with graphic controller and SD support +// http://reprap.org/wiki/Mini_panel +// #define MINIPANEL + /** * I2C Panels */ diff --git a/Marlin/pins_RAMPS_13.h b/Marlin/pins_RAMPS_13.h index e56ebdead..93dd66d95 100644 --- a/Marlin/pins_RAMPS_13.h +++ b/Marlin/pins_RAMPS_13.h @@ -191,6 +191,27 @@ #define DOGLCD_CS 29 #define DOGLCD_A0 27 #define LCD_PIN_BL 33 + #elif defined(MINIPANEL) + #define BEEPER 42 + // Pins for DOGM SPI LCD Support + #define DOGLCD_A0 44 + #define DOGLCD_CS 66 + #define LCD_PIN_BL 65 // backlight LED on A11/D65 + #define SDSS 53 + + #define KILL_PIN 64 + // GLCD features + //#define LCD_CONTRAST 190 + // Uncomment screen orientation + // #define LCD_SCREEN_ROT_90 + // #define LCD_SCREEN_ROT_180 + // #define LCD_SCREEN_ROT_270 + //The encoder and click button + #define BTN_EN1 40 + #define BTN_EN2 63 + #define BTN_ENC 59 //the click switch + //not connected to a pin + #define SDCARDDETECT 49 #else // arduino pin which triggers an piezzo beeper #define BEEPER 33 // Beeper on AUX-4