From d3b713cebcf302896ca388470a76463450d7297d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 30 Jul 2016 03:07:20 -0700 Subject: [PATCH] Set flags for RAMPS "type" in pins.h --- Marlin/pins.h | 30 ++++++++++++++++++++++++++---- Marlin/pins_FELIX2.h | 2 +- Marlin/pins_MKS_13.h | 2 +- Marlin/pins_MKS_BASE.h | 2 +- Marlin/pins_RAMPS_13_EFB.h | 32 -------------------------------- Marlin/pins_RAMPS_14.h | 15 +++++---------- Marlin/pins_RAMPS_14_EFB.h | 34 ---------------------------------- Marlin/pins_SAINSMART_2IN1.h | 9 +++++---- 8 files changed, 39 insertions(+), 87 deletions(-) delete mode 100644 Marlin/pins_RAMPS_13_EFB.h delete mode 100644 Marlin/pins_RAMPS_14_EFB.h diff --git a/Marlin/pins.h b/Marlin/pins.h index 8133f4db5..548d44fdf 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -42,12 +42,34 @@ #elif MB(RAMPS_OLD) #include "pins_RAMPS_OLD.h" #elif MB(RAMPS_13_EFB) - #include "pins_RAMPS_13_EFB.h" -#elif MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF) + #define IS_RAMPS_EFB + #include "pins_RAMPS_13.h" +#elif MB(RAMPS_13_EEB) + #define IS_RAMPS_EEB + #include "pins_RAMPS_13.h" +#elif MB(RAMPS_13_EFF) + #define IS_RAMPS_EFF + #include "pins_RAMPS_13.h" +#elif MB(RAMPS_13_EEF) + #define IS_RAMPS_EEF + #include "pins_RAMPS_13.h" +#elif MB(RAMPS_13_SF) + #define IS_RAMPS_SF #include "pins_RAMPS_13.h" #elif MB(RAMPS_14_EFB) - #include "pins_RAMPS_14_EFB.h" -#elif MB(RAMPS_14_EEB) || MB(RAMPS_14_EFF) || MB(RAMPS_14_EEF) || MB(RAMPS_14_SF) + #define IS_RAMPS_EFB + #include "pins_RAMPS_14.h" +#elif MB(RAMPS_14_EEB) + #define IS_RAMPS_EEB + #include "pins_RAMPS_14.h" +#elif MB(RAMPS_14_EFF) + #define IS_RAMPS_EFF + #include "pins_RAMPS_14.h" +#elif MB(RAMPS_14_EEF) + #define IS_RAMPS_EEF + #include "pins_RAMPS_14.h" +#elif MB(RAMPS_14_SF) + #define IS_RAMPS_SF #include "pins_RAMPS_14.h" #elif MB(GEN6) #include "pins_GEN6.h" diff --git a/Marlin/pins_FELIX2.h b/Marlin/pins_FELIX2.h index 16ad9f4f7..d164f99c7 100644 --- a/Marlin/pins_FELIX2.h +++ b/Marlin/pins_FELIX2.h @@ -32,7 +32,7 @@ #define HI_VOLT_PIN_D 7 -#include "pins_RAMPS_14_EFB.h" +#include "pins_RAMPS_14.h" #undef SDPOWER #define SDPOWER 1 diff --git a/Marlin/pins_MKS_13.h b/Marlin/pins_MKS_13.h index e536d870b..eee34dd6f 100644 --- a/Marlin/pins_MKS_13.h +++ b/Marlin/pins_MKS_13.h @@ -37,7 +37,7 @@ #define HI_VOLT_PIN_D 7 -#include "pins_RAMPS_14_EFB.h" +#include "pins_RAMPS_14.h" #if ENABLED(VIKI2) || ENABLED(miniVIKI) /** diff --git a/Marlin/pins_MKS_BASE.h b/Marlin/pins_MKS_BASE.h index 583f82b1d..92895b1d7 100644 --- a/Marlin/pins_MKS_BASE.h +++ b/Marlin/pins_MKS_BASE.h @@ -32,4 +32,4 @@ #define HI_VOLT_PIN_D 7 -#include "pins_RAMPS_14_EFB.h" \ No newline at end of file +#include "pins_RAMPS_14.h" \ No newline at end of file diff --git a/Marlin/pins_RAMPS_13_EFB.h b/Marlin/pins_RAMPS_13_EFB.h deleted file mode 100644 index 80e292729..000000000 --- a/Marlin/pins_RAMPS_13_EFB.h +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino Mega with RAMPS v1.3 pin assignments - * - * RAMPS_13_EFB (Extruder, Fan, Bed) - */ - -#define BOARD_NAME "RAMPS 1.3 EFB" - -#define IS_RAMPS_13 -#include "pins_RAMPS_14_EFB.h" diff --git a/Marlin/pins_RAMPS_14.h b/Marlin/pins_RAMPS_14.h index 207743822..7cb89e996 100644 --- a/Marlin/pins_RAMPS_14.h +++ b/Marlin/pins_RAMPS_14.h @@ -151,30 +151,25 @@ #define HI_VOLT_PIN_A 10 #endif -#if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed +#if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed #define HEATER_0_PIN HI_VOLT_PIN_A #define FAN_PIN HI_VOLT_PIN_B #define HEATER_BED_PIN HI_VOLT_PIN_C - #if EXTRUDERS == 1 - #define FAN1_PIN HI_VOLT_PIN_D - #else - #define HEATER_1_PIN HI_VOLT_PIN_D - #endif -#elif MB(RAMPS_13_EEF) || MB(RAMPS_14_EEF) // Hotend, Hotend, Fan +#elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan #define HEATER_0_PIN HI_VOLT_PIN_A #define HEATER_1_PIN HI_VOLT_PIN_B #define FAN_PIN HI_VOLT_PIN_C -#elif MB(RAMPS_13_EEB) || MB(RAMPS_14_EEB) // Hotend, Hotend, Bed +#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed #define HEATER_0_PIN HI_VOLT_PIN_A #define HEATER_1_PIN HI_VOLT_PIN_B #define HEATER_BED_PIN HI_VOLT_PIN_C #define FAN_PIN 4 // IO pin. Buffer needed -#elif MB(RAMPS_13_EFF) || MB(RAMPS_14_EFF) // Hotend, Fan, Fan (EFF is reversed?) +#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan (EFF is reversed?) #define HEATER_0_PIN HI_VOLT_PIN_C #define FAN_PIN HI_VOLT_PIN_B #define FAN1_PIN HI_VOLT_PIN_A #define CONTROLLERFAN_PIN -1 -#elif MB(RAMPS_13_SF) || MB(RAMPS_14_SF) // Spindle, Fan +#elif ENABLED(IS_RAMPS_SF) // Spindle, Fan #define FAN_PIN HI_VOLT_PIN_C #else // Non-specific are "EFB" by legacy #define HEATER_0_PIN HI_VOLT_PIN_A diff --git a/Marlin/pins_RAMPS_14_EFB.h b/Marlin/pins_RAMPS_14_EFB.h deleted file mode 100644 index b7282ea56..000000000 --- a/Marlin/pins_RAMPS_14_EFB.h +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino Mega with RAMPS v1.4 pin assignments - * - * RAMPS_14_EFB (Extruder, Fan, Bed) - */ - -#ifndef BOARD_NAME - #define BOARD_NAME "RAMPS 1.4 EFB" -#endif - -#define IS_RAMPS_EFB -#include "pins_RAMPS_14.h" diff --git a/Marlin/pins_SAINSMART_2IN1.h b/Marlin/pins_SAINSMART_2IN1.h index cc74c910a..c032d4d6f 100644 --- a/Marlin/pins_SAINSMART_2IN1.h +++ b/Marlin/pins_SAINSMART_2IN1.h @@ -30,8 +30,9 @@ #define BOARD_NAME "Sainsmart" -#define HI_VOLT_PIN_A 9 -#define HI_VOLT_PIN_B 7 // PART FAN in front of board next to Extruder heat -#define HI_VOLT_PIN_D 10 +#define HI_VOLT_PIN_A 9 // E +#define HI_VOLT_PIN_B 7 // F PART FAN in front of board next to Extruder heat + // HI_VOLT_PIN_C 8 // B +#define HI_VOLT_PIN_D 10 // F / E -#include "pins_RAMPS_14_EFB.h" +#include "pins_RAMPS_14.h"