Extended condition macros (#13419)
Allow `ENABLED`, `DISABLED`, `PIN_EXISTS`, and `BUTTON_EXISTS` to take multiple arguments. Also add: - Alias `ANY(...)` for `!DISABLED(...)` - Alias `ANY_PIN(...)` for `PIN_EXISTS(a) || PIN_EXISTS(b) ...` - Alias `EITHER(A,B)` for `ANY(...)` - Alias `ALL(...)` and `BOTH(A,B)` for `ENABLED(...)` - `NONE(...)` for `DISABLED(...)`
This commit is contained in:
@ -874,7 +874,7 @@
|
||||
#define _EPIN(p,q) __EPIN(p,q)
|
||||
|
||||
// The X2 axis, if any, should be the next open extruder port
|
||||
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(X_DUAL_STEPPER_DRIVERS)
|
||||
#if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS)
|
||||
#ifndef X2_STEP_PIN
|
||||
#define X2_STEP_PIN _EPIN(E_STEPPERS, STEP)
|
||||
#define X2_DIR_PIN _EPIN(E_STEPPERS, DIR)
|
||||
|
@ -75,7 +75,7 @@
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
|
||||
#if BOTH(ULTRA_LCD, NEWPANEL)
|
||||
#undef BEEPER_PIN
|
||||
|
||||
#undef LCD_PINS_RS
|
||||
@ -154,7 +154,7 @@
|
||||
#define SPINDLE_LASER_PWM_PIN 46 // MUST BE HARDWARE PWM
|
||||
#define SPINDLE_LASER_ENABLE_PIN 62 // Pin should have a pullup!
|
||||
#define SPINDLE_DIR_PIN 48
|
||||
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // use expansion header if no LCD in use
|
||||
#elif !BOTH(ULTRA_LCD, NEWPANEL) // use expansion header if no LCD in use
|
||||
#define SPINDLE_LASER_ENABLE_PIN 16 // Pin should have a pullup/pulldown!
|
||||
#define SPINDLE_DIR_PIN 17
|
||||
#endif
|
||||
|
@ -162,7 +162,7 @@
|
||||
#define LCD_PINS_D6 16
|
||||
#define LCD_PINS_D7 17
|
||||
#define ADC_KEYPAD_PIN 1
|
||||
#elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(ANET_FULL_GRAPHICS_LCD)
|
||||
#elif EITHER(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, ANET_FULL_GRAPHICS_LCD)
|
||||
// Pin definitions for the Anet A6 Full Graphics display and the RepRapDiscount Full Graphics
|
||||
// display using an adapter board // https://go.aisler.net/benlye/anet-lcd-adapter/pcb
|
||||
// See below for alternative pin definitions for use with https://www.thingiverse.com/thing:2103748
|
||||
|
@ -53,7 +53,7 @@
|
||||
#undef STAT_LED_RED_PIN
|
||||
#undef STAT_LED_BLUE_PIN
|
||||
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
|
||||
#undef DOGLCD_A0
|
||||
#undef DOGLCD_CS
|
||||
@ -75,7 +75,7 @@
|
||||
//
|
||||
// Misc
|
||||
//
|
||||
#if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT) && PIN_EXISTS(STAT_LED_RED) && STAT_LED_RED_PIN == CASE_LIGHT_PIN
|
||||
#if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT, STAT_LED_RED) && STAT_LED_RED_PIN == CASE_LIGHT_PIN
|
||||
#undef STAT_LED_RED_PIN
|
||||
#endif
|
||||
|
||||
|
@ -139,7 +139,7 @@
|
||||
#undef BEEPER_PIN
|
||||
#define BEEPER_PIN 33
|
||||
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
#undef SD_DETECT_PIN
|
||||
#define SD_DETECT_PIN 49 // For easy adapter board
|
||||
#undef BEEPER_PIN
|
||||
@ -152,7 +152,7 @@
|
||||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
#if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT) && defined(DOGLCD_A0) && DOGLCD_A0 == CASE_LIGHT_PIN
|
||||
#if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT) && defined(DOGLCD_A0) && DOGLCD_A0 == CASE_LIGHT_PIN
|
||||
#undef DOGLCD_A0 // Steal pin 44 for the case light; if you have a Viki2 and have connected it
|
||||
#define DOGLCD_A0 57 // following the Panucatt wiring diagram, you may need to tweak these pin assignments
|
||||
// as the wiring diagram uses pin 44 for DOGLCD_A0
|
||||
@ -166,7 +166,7 @@
|
||||
#undef SPINDLE_DIR_PIN
|
||||
|
||||
#if ENABLED(SPINDLE_LASER_ENABLE) // EXP2 header
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
#undef BTN_EN2
|
||||
#define BTN_EN2 31 // need 7 for the spindle speed PWM
|
||||
#endif
|
||||
|
@ -112,7 +112,7 @@
|
||||
// Display
|
||||
//
|
||||
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
#define BEEPER_PIN P1_31
|
||||
#define DOGLCD_A0 P2_06
|
||||
#define DOGLCD_CS P0_16
|
||||
|
@ -143,7 +143,7 @@
|
||||
//#define SHIFT_EN P1_22 // (41) J5-4 & AUX-4
|
||||
#endif
|
||||
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
//#define LCD_SCREEN_ROT_180
|
||||
|
||||
#define BEEPER_PIN P1_30 // (37) may change if cable changes
|
||||
|
@ -126,7 +126,7 @@
|
||||
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
|
||||
#define LCD_PINS_ENABLE 51 // SID (MOSI)
|
||||
#define LCD_PINS_D4 52 // SCK (CLK) clock
|
||||
#elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
|
||||
#elif BOTH(NEWPANEL, PANEL_ONE)
|
||||
#define LCD_PINS_RS PB8
|
||||
#define LCD_PINS_ENABLE PD2
|
||||
#define LCD_PINS_D4 PB12
|
||||
@ -193,7 +193,7 @@
|
||||
#define LCD_SDSS 53
|
||||
#define SD_DETECT_PIN 49
|
||||
|
||||
#elif ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#elif ANY(VIKI2, miniVIKI)
|
||||
|
||||
#define BEEPER_PIN 33
|
||||
|
||||
|
@ -125,7 +125,7 @@
|
||||
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
|
||||
#define LCD_PINS_ENABLE 51 // SID (MOSI)
|
||||
#define LCD_PINS_D4 52 // SCK (CLK) clock
|
||||
#elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
|
||||
#elif BOTH(NEWPANEL, PANEL_ONE)
|
||||
#define LCD_PINS_RS PB8
|
||||
#define LCD_PINS_ENABLE PD2
|
||||
#define LCD_PINS_D4 PB12
|
||||
@ -192,7 +192,7 @@
|
||||
#define LCD_SDSS 53
|
||||
#define SD_DETECT_PIN 49
|
||||
|
||||
#elif ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#elif ANY(VIKI2, miniVIKI)
|
||||
|
||||
#define BEEPER_PIN 33
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
|
||||
#if BOTH(ULTRA_LCD, NEWPANEL)
|
||||
|
||||
#define SD_DETECT_PIN 6
|
||||
|
||||
|
@ -35,9 +35,7 @@
|
||||
#define FIL_RUNOUT_PIN 22
|
||||
#endif
|
||||
|
||||
#define GREEDY_PANEL ( ENABLED(PANEL_ONE) || ENABLED(VIKI2) \
|
||||
|| ENABLED(miniVIKI) || ENABLED(MINIPANEL) \
|
||||
|| ENABLED(REPRAPWORLD_KEYPAD) )
|
||||
#define GREEDY_PANEL ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)
|
||||
|
||||
//
|
||||
// M3/M4/M5 - Spindle/Laser Control
|
||||
|
@ -104,7 +104,7 @@
|
||||
//
|
||||
#define BEEPER_PIN 33
|
||||
|
||||
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
|
||||
#if BOTH(ULTRA_LCD, NEWPANEL)
|
||||
|
||||
#define LCD_PINS_RS 16
|
||||
#define LCD_PINS_ENABLE 17
|
||||
|
@ -175,9 +175,9 @@
|
||||
#endif
|
||||
|
||||
#ifndef FAN_PIN
|
||||
#if ENABLED(IS_EFB) || ENABLED(IS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
|
||||
#if EITHER(IS_EFB, IS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
|
||||
#define FAN_PIN EX2_HEAT_PIN
|
||||
#elif ENABLED(IS_EEF) || ENABLED(IS_SF) // Hotend, Hotend, Fan or Spindle, Fan
|
||||
#elif EITHER(IS_EEF, IS_SF) // Hotend, Hotend, Fan or Spindle, Fan
|
||||
#define FAN_PIN HBP_PIN
|
||||
#else
|
||||
#define FAN_PIN EXTRA_FET_PIN
|
||||
|
@ -56,7 +56,7 @@
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
/**
|
||||
* VIKI2 Has two groups of wires with...
|
||||
*
|
||||
|
@ -245,7 +245,7 @@
|
||||
#define LCD_SDSS P0_28 // EXP2.4
|
||||
#define LCD_PINS_ENABLE P0_18 // EXP1.3
|
||||
#define LCD_PINS_D4 P0_15 // EXP1.5
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
#define DOGLCD_SCK SCK_PIN
|
||||
#define DOGLCD_MOSI MOSI_PIN
|
||||
#endif
|
||||
|
@ -123,7 +123,7 @@
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
|
||||
#if BOTH(ULTRA_LCD, NEWPANEL)
|
||||
|
||||
#define LCD_PINS_RS 9 // E1 JP11-11
|
||||
#define LCD_PINS_ENABLE 8 // E0 JP11-10
|
||||
@ -132,7 +132,7 @@
|
||||
#define LCD_PINS_D6 5 // D5 JP11-6
|
||||
#define LCD_PINS_D7 4 // D4 JP11-5
|
||||
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
#define BEEPER_PIN 8 // E0 JP11-10
|
||||
|
||||
#define DOGLCD_A0 40 // F2 JP2-2
|
||||
|
@ -208,7 +208,7 @@
|
||||
#define LCD_PINS_D6 5 // D5 JP11-6
|
||||
#define LCD_PINS_D7 4 // D4 JP11-5
|
||||
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
|
||||
#define BEEPER_PIN 8 // E0 JP11-10
|
||||
#define DOGLCD_A0 40 // F2 JP2-2
|
||||
|
@ -175,7 +175,7 @@
|
||||
#define LCD_PINS_D6 74
|
||||
#define LCD_PINS_D7 75
|
||||
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
#define BEEPER_PIN 44
|
||||
// NB: Panucatt's Viki 2.0 wiring diagram (v1.2) indicates that the
|
||||
// beeper/buzzer is connected to pin 33; however, the pin used in the
|
||||
|
@ -199,13 +199,13 @@
|
||||
#endif
|
||||
|
||||
#ifndef FAN_PIN
|
||||
#if ENABLED(IS_RAMPS_EFB) || ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
|
||||
#if EITHER(IS_RAMPS_EFB, IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
|
||||
#define FAN_PIN RAMPS_D9_PIN
|
||||
#elif ENABLED(IS_RAMPS_EEF) || ENABLED(IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan
|
||||
#elif EITHER(IS_RAMPS_EEF, IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan
|
||||
#define FAN_PIN RAMPS_D8_PIN
|
||||
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
|
||||
#define FAN_PIN 4 // IO pin. Buffer needed
|
||||
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
|
||||
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
|
||||
#define FAN_PIN 4 // IO pin. Buffer needed
|
||||
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
|
||||
#define FAN_PIN RAMPS_D9_PIN
|
||||
#endif
|
||||
#endif
|
||||
@ -232,8 +232,7 @@
|
||||
#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENABLE_PIN)
|
||||
#if NUM_SERVOS <= 1 // try to use servo connector first
|
||||
#define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM
|
||||
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \
|
||||
&& (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2
|
||||
#elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) // try to use AUX 2
|
||||
#define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM
|
||||
#endif
|
||||
#endif
|
||||
@ -246,8 +245,7 @@
|
||||
#define SPINDLE_LASER_ENABLE_PIN 4 // Pin should have a pullup/pulldown!
|
||||
#define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM
|
||||
#define SPINDLE_DIR_PIN 5
|
||||
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \
|
||||
&& (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2
|
||||
#elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) // try to use AUX 2
|
||||
#define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup/pulldown!
|
||||
#define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM
|
||||
#define SPINDLE_DIR_PIN 65
|
||||
@ -347,7 +345,7 @@
|
||||
#define LCD_PINS_ENABLE 51 // SID (MOSI)
|
||||
#define LCD_PINS_D4 52 // SCK (CLK) clock
|
||||
|
||||
#elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
|
||||
#elif BOTH(NEWPANEL, PANEL_ONE)
|
||||
|
||||
#define LCD_PINS_RS 40
|
||||
#define LCD_PINS_ENABLE 42
|
||||
@ -379,7 +377,7 @@
|
||||
|
||||
#else
|
||||
|
||||
#if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
|
||||
#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
|
||||
#define LCD_PINS_DC 25 // Set as output on init
|
||||
#define LCD_PINS_RS 27 // Pull low for 1s to init
|
||||
// DOGM SPI LCD Support
|
||||
@ -463,7 +461,7 @@
|
||||
#define LCD_SDSS SDSS
|
||||
#define SD_DETECT_PIN 49
|
||||
|
||||
#elif ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#elif ANY(VIKI2, miniVIKI)
|
||||
|
||||
#define DOGLCD_CS 45
|
||||
#define DOGLCD_A0 44
|
||||
|
@ -76,7 +76,7 @@
|
||||
//
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
|
||||
#if ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
|
||||
#if BOTH(NEWPANEL, PANEL_ONE)
|
||||
#undef LCD_PINS_D4
|
||||
#define LCD_PINS_D4 68
|
||||
|
||||
|
@ -161,7 +161,7 @@
|
||||
#define DOGLCD_A0 27
|
||||
#endif
|
||||
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
#define DOGLCD_A0 16
|
||||
#define KILL_PIN 51
|
||||
#define STAT_LED_BLUE_PIN 29
|
||||
|
@ -220,8 +220,7 @@
|
||||
#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENABLE_PIN)
|
||||
#if NUM_SERVOS <= 1 // try to use servo connector first
|
||||
#define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM
|
||||
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \
|
||||
&& (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2
|
||||
#elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) // try to use AUX 2
|
||||
#define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM
|
||||
#endif
|
||||
#endif
|
||||
@ -234,8 +233,7 @@
|
||||
#define SPINDLE_LASER_ENABLE_PIN 4 // Pin should have a pullup/pulldown!
|
||||
#define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM
|
||||
#define SPINDLE_DIR_PIN 5
|
||||
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \
|
||||
&& (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2
|
||||
#elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) // try to use AUX 2
|
||||
#define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup/pulldown!
|
||||
#define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM
|
||||
#define SPINDLE_DIR_PIN 65
|
||||
@ -335,7 +333,7 @@
|
||||
#define LCD_PINS_ENABLE 51 // SID (MOSI)
|
||||
#define LCD_PINS_D4 52 // SCK (CLK) clock
|
||||
|
||||
#elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
|
||||
#elif BOTH(NEWPANEL, PANEL_ONE)
|
||||
|
||||
#define LCD_PINS_RS 40
|
||||
#define LCD_PINS_ENABLE 42
|
||||
@ -367,7 +365,7 @@
|
||||
|
||||
#else
|
||||
|
||||
#if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
|
||||
#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
|
||||
#define LCD_PINS_DC 25 // Set as output on init
|
||||
#define LCD_PINS_RS 27 // Pull low for 1s to init
|
||||
// DOGM SPI LCD Support
|
||||
@ -451,7 +449,7 @@
|
||||
#define LCD_SDSS SDSS
|
||||
#define SD_DETECT_PIN 49
|
||||
|
||||
#elif ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#elif ANY(VIKI2, miniVIKI)
|
||||
|
||||
#define DOGLCD_CS 45
|
||||
#define DOGLCD_A0 44
|
||||
|
@ -73,7 +73,7 @@
|
||||
#undef E0_CS_PIN
|
||||
#undef E1_CS_PIN
|
||||
|
||||
#if ENABLED(ULTRA_LCD) && DISABLED(REPRAPWORLD_GRAPHICAL_LCD) && (DISABLED(NEWPANEL) || DISABLED(PANEL_ONE)) && DISABLED(CR10_STOCKDISPLAY)
|
||||
#if ENABLED(ULTRA_LCD) && DISABLED(REPRAPWORLD_GRAPHICAL_LCD) && !BOTH(NEWPANEL, PANEL_ONE) && DISABLED(CR10_STOCKDISPLAY)
|
||||
#if DISABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
|
||||
#undef LCD_PINS_RS
|
||||
#define LCD_PINS_RS 42 // 3DYMY boards pin 16 -> 42
|
||||
|
@ -173,13 +173,13 @@
|
||||
#endif
|
||||
|
||||
#ifndef FAN_PIN
|
||||
#if ENABLED(IS_RAMPS_EFB) || ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
|
||||
#if EITHER(IS_RAMPS_EFB, IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
|
||||
#define FAN_PIN RAMPS_D9_PIN
|
||||
#elif ENABLED(IS_RAMPS_EEF) || ENABLED(IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan
|
||||
#elif EITHER(IS_RAMPS_EEF, IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan
|
||||
#define FAN_PIN RAMPS_D8_PIN
|
||||
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
|
||||
#define FAN_PIN P1_18 // (4) IO pin. Buffer needed
|
||||
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
|
||||
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
|
||||
#define FAN_PIN P1_18 // (4) IO pin. Buffer needed
|
||||
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
|
||||
#define FAN_PIN RAMPS_D9_PIN
|
||||
#endif
|
||||
#endif
|
||||
@ -293,7 +293,7 @@
|
||||
//#define SHIFT_EN P1_22 // (41) J5-4 & AUX-4
|
||||
#endif
|
||||
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
// #define LCD_SCREEN_ROT_180
|
||||
|
||||
#define BTN_EN1 P3_26 // (31) J3-2 & AUX-4
|
||||
|
@ -167,7 +167,7 @@
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
|
||||
#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
|
||||
#define LCD_PINS_DC 38 // Set as output on init
|
||||
#define LCD_PINS_RS 41 // Pull low for 1s to init
|
||||
// DOGM SPI LCD Support
|
||||
|
@ -202,7 +202,7 @@
|
||||
//
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
|
||||
#if ENABLED(RADDS_DISPLAY) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
|
||||
#if EITHER(RADDS_DISPLAY, REPRAP_DISCOUNT_SMART_CONTROLLER)
|
||||
|
||||
#define BEEPER_PIN 62
|
||||
|
||||
|
@ -188,7 +188,7 @@
|
||||
//
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
|
||||
#if ENABLED(RADDS_DISPLAY) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
|
||||
#if EITHER(RADDS_DISPLAY, REPRAP_DISCOUNT_SMART_CONTROLLER)
|
||||
|
||||
#define BEEPER_PIN 62
|
||||
|
||||
|
@ -137,7 +137,7 @@
|
||||
#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
|
||||
#if DISABLED(SPINDLE_LASER_ENABLE) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL) // try to use IO Header
|
||||
#define CASE_LIGHT_PIN 4 // MUST BE HARDWARE PWM - see if IO Header is available
|
||||
#endif
|
||||
|
||||
@ -277,7 +277,7 @@
|
||||
// M3/M4/M5 - Spindle/Laser Control
|
||||
//
|
||||
#if ENABLED(SPINDLE_LASER_ENABLE)
|
||||
#if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // try to use IO Header
|
||||
#if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL) // try to use IO Header
|
||||
|
||||
#define SPINDLE_LASER_ENABLE_PIN 10 // Pin should have a pullup/pulldown!
|
||||
#define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM
|
||||
|
@ -161,7 +161,7 @@
|
||||
#define SR_CLK_PIN EXT_AUX_SCL_D0
|
||||
#endif
|
||||
|
||||
#if ENABLED(SAV_3DLCD) || ENABLED(SAV_3DGLCD)
|
||||
#if EITHER(SAV_3DLCD, SAV_3DGLCD)
|
||||
|
||||
#define BTN_EN1 EXT_AUX_A1_IO
|
||||
#define BTN_EN2 EXT_AUX_A0_IO
|
||||
|
@ -144,7 +144,7 @@
|
||||
|
||||
#define HOME_PIN BTN_HOME
|
||||
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
#define BEEPER_PIN 44
|
||||
// Pins for DOGM SPI LCD Support
|
||||
#define DOGLCD_A0 70
|
||||
|
@ -95,7 +95,7 @@
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
|
||||
#define BEEPER_PIN P1_31
|
||||
#define DOGLCD_A0 P2_11
|
||||
|
@ -105,7 +105,7 @@
|
||||
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
|
||||
#define LCD_PINS_ENABLE 51 // SID (MOSI)
|
||||
#define LCD_PINS_D4 52 // SCK (CLK) clock
|
||||
#elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
|
||||
#elif BOTH(NEWPANEL, PANEL_ONE)
|
||||
#define LCD_PINS_RS PB8
|
||||
#define LCD_PINS_ENABLE PD2
|
||||
#define LCD_PINS_D4 PB12
|
||||
@ -172,7 +172,7 @@
|
||||
#define LCD_SDSS 53
|
||||
#define SD_DETECT_PIN 49
|
||||
|
||||
#elif ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#elif ANY(VIKI2, miniVIKI)
|
||||
|
||||
#define BEEPER_PIN 33
|
||||
|
||||
|
@ -120,7 +120,7 @@
|
||||
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
|
||||
#define LCD_PINS_ENABLE 51 // SID (MOSI)
|
||||
#define LCD_PINS_D4 52 // SCK (CLK) clock
|
||||
#elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
|
||||
#elif BOTH(NEWPANEL, PANEL_ONE)
|
||||
#define LCD_PINS_RS PB8
|
||||
#define LCD_PINS_ENABLE PD2
|
||||
#define LCD_PINS_D4 PB12
|
||||
@ -187,7 +187,7 @@
|
||||
#define LCD_SDSS 53
|
||||
#define SD_DETECT_PIN 49
|
||||
|
||||
#elif ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#elif ANY(VIKI2, miniVIKI)
|
||||
|
||||
#define BEEPER_PIN 33
|
||||
|
||||
|
@ -140,7 +140,7 @@
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
|
||||
#if BOTH(ULTRA_LCD, NEWPANEL)
|
||||
|
||||
#define BEEPER_PIN -1
|
||||
|
||||
|
@ -74,14 +74,14 @@
|
||||
#if 0 && ENABLED(ULTRA_LCD)
|
||||
|
||||
// LCD Display output pins
|
||||
#if ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
|
||||
#if BOTH(NEWPANEL, PANEL_ONE)
|
||||
#undef LCD_PINS_D6
|
||||
#define LCD_PINS_D6 57
|
||||
#endif
|
||||
|
||||
// LCD Display input pins
|
||||
#if ENABLED(NEWPANEL)
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#if ANY(VIKI2, miniVIKI)
|
||||
#undef DOGLCD_A0
|
||||
#define DOGLCD_A0 23
|
||||
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||
|
@ -144,14 +144,15 @@
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if ENABLED(board_rev_1_0) || ENABLED(board_rev_1_1_TO_1_3)
|
||||
#if ANY(board_rev_1_0, board_rev_1_1_TO_1_3)
|
||||
#define LCD_PINS_RS 24
|
||||
#define LCD_PINS_ENABLE 22
|
||||
#define LCD_PINS_D4 36
|
||||
#define LCD_PINS_D5 34
|
||||
#define LCD_PINS_D6 32
|
||||
#define LCD_PINS_D7 30
|
||||
#elif ENABLED(board_rev_1_5) && ENABLED(ULTRA_LCD)
|
||||
|
||||
#elif ENABLED(board_rev_1_5, ULTRA_LCD)
|
||||
|
||||
#define BEEPER_PIN 18
|
||||
|
||||
|
@ -367,7 +367,7 @@
|
||||
// Chip Select and Digital Micro-stepping
|
||||
//
|
||||
|
||||
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(X_DUAL_STEPPER_DRIVERS)
|
||||
#if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS)
|
||||
#if PIN_EXISTS(X2_CS)
|
||||
#define _X2_CS X2_CS_PIN,
|
||||
#else
|
||||
|
Reference in New Issue
Block a user