From 356af7dcb0cc80a0573a61279c7680ec2b9e7352 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 23 Aug 2017 18:20:40 -0500 Subject: [PATCH] Tweak Sanguinololu-related pins files --- Marlin/pins_AZTEEG_X1.h | 3 +-- Marlin/pins_MELZI.h | 9 ++------- Marlin/pins_MELZI_CREALITY.h | 9 ++------- Marlin/pins_MELZI_MAKR3D.h | 9 ++------- Marlin/pins_SANGUINOLOLU_11.h | 29 ++++++++++++++++++++--------- Marlin/pins_SANGUINOLOLU_12.h | 7 +++---- Marlin/pins_STB_11.h | 8 +------- 7 files changed, 31 insertions(+), 43 deletions(-) diff --git a/Marlin/pins_AZTEEG_X1.h b/Marlin/pins_AZTEEG_X1.h index 8f87a7eaa7..17290d1108 100644 --- a/Marlin/pins_AZTEEG_X1.h +++ b/Marlin/pins_AZTEEG_X1.h @@ -26,5 +26,4 @@ #define BOARD_NAME "Azteeg X1" -#define SANGUINOLOLU_V_1_2 -#include "pins_SANGUINOLOLU_11.h" +#include "pins_SANGUINOLOLU_12.h" diff --git a/Marlin/pins_MELZI.h b/Marlin/pins_MELZI.h index 7c99373f3a..4f6ccb5e07 100644 --- a/Marlin/pins_MELZI.h +++ b/Marlin/pins_MELZI.h @@ -25,10 +25,5 @@ */ #define BOARD_NAME "Melzi" - -#ifdef __AVR_ATmega1284P__ - #define LARGE_FLASH true -#endif - -#define SANGUINOLOLU_V_1_2 -#include "pins_SANGUINOLOLU_11.h" +#define IS_MELZI +#include "pins_SANGUINOLOLU_12.h" diff --git a/Marlin/pins_MELZI_CREALITY.h b/Marlin/pins_MELZI_CREALITY.h index d66f589fea..b2f0cf8716 100644 --- a/Marlin/pins_MELZI_CREALITY.h +++ b/Marlin/pins_MELZI_CREALITY.h @@ -25,17 +25,12 @@ */ #define BOARD_NAME "Melzi (Creality)" - -#ifdef __AVR_ATmega1284P__ - #define LARGE_FLASH true -#endif +#define IS_MELZI +#include "pins_SANGUINOLOLU_12.h" // For the stock CR-10 use the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER // option for the display in Configuration.h -#define SANGUINOLOLU_V_1_2 -#include "pins_SANGUINOLOLU_11.h" - #undef LCD_SDSS #undef LED_PIN diff --git a/Marlin/pins_MELZI_MAKR3D.h b/Marlin/pins_MELZI_MAKR3D.h index bd86f59c01..556f9ce87f 100644 --- a/Marlin/pins_MELZI_MAKR3D.h +++ b/Marlin/pins_MELZI_MAKR3D.h @@ -25,10 +25,5 @@ */ #define BOARD_NAME "Melzi (ATmega1284)" - -#ifdef __AVR_ATmega1284P__ - #define LARGE_FLASH true -#endif - -#define SANGUINOLOLU_V_1_2 -#include "pins_SANGUINOLOLU_11.h" +#define IS_MELZI +#include "pins_SANGUINOLOLU_12.h" diff --git a/Marlin/pins_SANGUINOLOLU_11.h b/Marlin/pins_SANGUINOLOLU_11.h index 0691fb321a..4ed004549f 100644 --- a/Marlin/pins_SANGUINOLOLU_11.h +++ b/Marlin/pins_SANGUINOLOLU_11.h @@ -59,7 +59,9 @@ #define BOARD_NAME "Sanguinololu <1.2" #endif -#define IS_MELZI (MB(MELZI) || MB(MELZI_MAKR3D) || MB(MELZI_CREALITY)) +#ifdef __AVR_ATmega1284P__ + #define LARGE_FLASH true +#endif // // Limit Switches @@ -116,7 +118,7 @@ #endif -#if MB(AZTEEG_X1) || MB(STB_11) || IS_MELZI +#if MB(AZTEEG_X1) || MB(STB_11) || ENABLED(IS_MELZI) #define FAN_PIN 4 // Works for Panelolu2 too #endif @@ -133,16 +135,25 @@ //#define SDSS 24 #define SDSS 31 -#if IS_MELZI - #define LED_PIN 27 +#if ENABLED(IS_MELZI) + #define LED_PIN 27 #elif MB(STB_11) #define LCD_BACKLIGHT_PIN 17 // LCD backlight LED #endif #if DISABLED(SPINDLE_LASER_ENABLE) && ENABLED(SANGUINOLOLU_V_1_2) && !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // try to use IO Header - #define CASE_LIGHT_PIN 4 // MUST BE HARDWARE PWM - see if IO Header is available + #define CASE_LIGHT_PIN 4 // MUST BE HARDWARE PWM - see if IO Header is available #endif +/** + * Sanguinololu 1.4 AUX pins: + * + * PWM TX1 RX1 SDA SCL + * 12V 5V D12 D11 D10 D17 D16 + * GND GND D31 D30 D29 D28 D27 + * A4 A3 A2 A1 A0 + */ + // // LCD / Controller // @@ -152,7 +163,7 @@ #if ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 - #if IS_MELZI // Melzi board + #if ENABLED(IS_MELZI) #define LCD_PINS_RS 30 // CS chip select /SS chip slave select #define LCD_PINS_ENABLE 29 // SID (MOSI) #define LCD_PINS_D4 17 // SCK (CLK) clock @@ -160,7 +171,7 @@ // Marlin so this can be used for BEEPER_PIN. You can use this pin // with M42 instead of BEEPER_PIN. #define BEEPER_PIN 27 - #else // Sanguinololu 1.3 + #else // Sanguinololu >=1.3 #define LCD_PINS_RS 4 #define LCD_PINS_ENABLE 17 #define LCD_PINS_D4 30 @@ -210,7 +221,7 @@ #if ENABLED(LCD_I2C_PANELOLU2) - #if IS_MELZI + #if ENABLED(IS_MELZI) #define BTN_ENC 29 #define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi #else @@ -280,7 +291,7 @@ * MS3 O| |O 2A * /RESET O| |O 1A * /SLEEP O| |O 1B - * SPINDLE_LASER_PWM_PIN STEP O| |O VDD + * SPINDLE_LASER_PWM_PIN STEP O| |O VDD * SPINDLE_LASER_ENABLE_PIN DIR O| |O GND * ------- * diff --git a/Marlin/pins_SANGUINOLOLU_12.h b/Marlin/pins_SANGUINOLOLU_12.h index 19c9e4939f..f648dce085 100644 --- a/Marlin/pins_SANGUINOLOLU_12.h +++ b/Marlin/pins_SANGUINOLOLU_12.h @@ -27,15 +27,14 @@ * * AZTEEG_X1 * MELZI + * MELZI_CREALITY * MELZI_MAKR3D * SANGUINOLOLU_12 * STB_11 */ -#define BOARD_NAME "Sanguinololu 1.2" - -#ifdef __AVR_ATmega1284P__ - #define LARGE_FLASH true +#ifndef BOARD_NAME + #define BOARD_NAME "Sanguinololu 1.2" #endif #define SANGUINOLOLU_V_1_2 diff --git a/Marlin/pins_STB_11.h b/Marlin/pins_STB_11.h index 05fc40481d..de769fcb68 100644 --- a/Marlin/pins_STB_11.h +++ b/Marlin/pins_STB_11.h @@ -25,10 +25,4 @@ */ #define BOARD_NAME "STB V1.1" - -#ifdef __AVR_ATmega1284P__ - #define LARGE_FLASH true -#endif - -#define SANGUINOLOLU_V_1_2 -#include "pins_SANGUINOLOLU_11.h" +#include "pins_SANGUINOLOLU_12.h"