From 2e4b037dbf155980405cfe73ae04efb7df23f618 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 30 Jan 2024 17:16:33 -0600 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20EITHER/BOTH=20=3D>=20ANY/A?= =?UTF-8?q?LL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/AVR/MarlinSerial.h | 2 +- Marlin/src/HAL/AVR/eeprom.cpp | 2 +- Marlin/src/HAL/AVR/inc/SanityCheck.h | 4 +- Marlin/src/HAL/DUE/HAL_SPI.cpp | 2 +- Marlin/src/HAL/DUE/inc/Conditionals_post.h | 2 +- Marlin/src/HAL/ESP32/HAL.cpp | 2 +- Marlin/src/HAL/ESP32/inc/SanityCheck.h | 8 +- Marlin/src/HAL/ESP32/ota.cpp | 2 +- Marlin/src/HAL/ESP32/spiffs.cpp | 2 +- Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp | 4 +- Marlin/src/HAL/ESP32/web.cpp | 2 +- Marlin/src/HAL/LINUX/spi_pins.h | 2 +- .../src/HAL/LPC1768/inc/Conditionals_post.h | 2 +- Marlin/src/HAL/LPC1768/spi_pins.h | 2 +- .../u8g/u8g_com_HAL_LPC1768_sw_spi.cpp | 4 +- Marlin/src/HAL/NATIVE_SIM/spi_pins.h | 2 +- .../src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp | 4 +- Marlin/src/HAL/SAMD21/HAL_SPI.cpp | 2 +- Marlin/src/HAL/SAMD21/inc/Conditionals_post.h | 2 +- Marlin/src/HAL/SAMD51/HAL_SPI.cpp | 2 +- Marlin/src/HAL/SAMD51/inc/Conditionals_post.h | 2 +- Marlin/src/HAL/STM32/inc/Conditionals_adv.h | 2 +- Marlin/src/HAL/STM32/inc/Conditionals_post.h | 2 +- Marlin/src/HAL/STM32/usb_host.cpp | 2 +- Marlin/src/HAL/STM32F1/HAL.cpp | 2 +- Marlin/src/HAL/STM32F1/HAL.h | 2 +- Marlin/src/HAL/STM32F1/MarlinSerial.cpp | 2 +- Marlin/src/HAL/STM32F1/MarlinSerial.h | 2 +- .../STM32F1/dogm/u8g_com_stm32duino_swspi.cpp | 2 +- .../src/HAL/STM32F1/inc/Conditionals_post.h | 2 +- Marlin/src/HAL/STM32F1/pinsDebug.h | 2 +- Marlin/src/HAL/STM32F1/sdio.cpp | 2 +- Marlin/src/HAL/shared/HAL_ST7920.h | 2 +- Marlin/src/HAL/shared/eeprom_api.cpp | 2 +- Marlin/src/MarlinCore.cpp | 18 +- Marlin/src/core/language.h | 2 +- Marlin/src/feature/babystep.h | 2 +- Marlin/src/feature/backlash.cpp | 2 +- Marlin/src/feature/bedlevel/bedlevel.cpp | 6 +- Marlin/src/feature/bedlevel/bedlevel.h | 6 +- Marlin/src/feature/cancel_object.cpp | 2 +- Marlin/src/feature/cooler.cpp | 2 +- Marlin/src/feature/host_actions.cpp | 6 +- Marlin/src/feature/leds/leds.cpp | 12 +- Marlin/src/feature/leds/leds.h | 4 +- Marlin/src/feature/leds/neopixel.cpp | 2 +- Marlin/src/feature/leds/neopixel.h | 2 +- Marlin/src/feature/mixing.cpp | 4 +- Marlin/src/feature/mixing.h | 2 +- Marlin/src/feature/mmu/mmu2.cpp | 2 +- Marlin/src/feature/pause.cpp | 10 +- Marlin/src/feature/pause.h | 2 +- Marlin/src/feature/power.cpp | 14 +- Marlin/src/feature/power.h | 4 +- Marlin/src/feature/powerloss.cpp | 2 +- Marlin/src/feature/solenoid.cpp | 2 +- Marlin/src/gcode/bedlevel/G35.cpp | 2 +- Marlin/src/gcode/bedlevel/abl/G29.cpp | 12 +- Marlin/src/gcode/calibrate/G28.cpp | 6 +- Marlin/src/gcode/calibrate/G34_M422.cpp | 4 +- Marlin/src/gcode/calibrate/G425.cpp | 2 +- Marlin/src/gcode/calibrate/G76_M871.cpp | 2 +- Marlin/src/gcode/calibrate/M100.cpp | 2 +- Marlin/src/gcode/control/M380_M381.cpp | 2 +- Marlin/src/gcode/control/M7-M9.cpp | 2 +- Marlin/src/gcode/control/M80_M81.cpp | 2 +- Marlin/src/gcode/control/T.cpp | 2 +- Marlin/src/gcode/feature/pause/M125.cpp | 2 +- Marlin/src/gcode/feature/pause/M701_M702.cpp | 2 +- Marlin/src/gcode/gcode.cpp | 20 +- Marlin/src/gcode/gcode.h | 18 +- Marlin/src/gcode/motion/G0_G1.cpp | 4 +- Marlin/src/gcode/parser.cpp | 2 +- Marlin/src/gcode/probe/G30.cpp | 2 +- Marlin/src/gcode/sd/M1001.cpp | 2 +- Marlin/src/gcode/sd/M34.cpp | 2 +- Marlin/src/gcode/temp/M155.cpp | 2 +- Marlin/src/gcode/temp/M303.cpp | 2 +- Marlin/src/inc/Conditionals_LCD.h | 82 ++++---- Marlin/src/inc/Conditionals_adv.h | 32 ++-- Marlin/src/inc/Conditionals_post.h | 56 +++--- Marlin/src/inc/SanityCheck.h | 178 +++++++++--------- Marlin/src/inc/Warnings.cpp | 8 +- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 14 +- Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp | 12 +- Marlin/src/lcd/buttons.h | 4 +- Marlin/src/lcd/dogm/dogm_Statusscreen.h | 16 +- Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 2 +- Marlin/src/lcd/dogm/marlinui_DOGM.h | 4 +- Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 10 +- Marlin/src/lcd/e3v2/creality/dwin.cpp | 20 +- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 6 +- Marlin/src/lcd/e3v2/marlinui/ui_common.cpp | 2 +- .../lcd/e3v2/marlinui/ui_status_480x272.cpp | 2 +- Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp | 2 +- Marlin/src/lcd/e3v2/proui/dwin.cpp | 34 ++-- Marlin/src/lcd/e3v2/proui/dwin.h | 12 +- Marlin/src/lcd/e3v2/proui/dwin_defines.h | 2 +- Marlin/src/lcd/e3v2/proui/endstop_diag.cpp | 2 +- Marlin/src/lcd/e3v2/proui/gcode_preview.cpp | 2 +- Marlin/src/lcd/e3v2/proui/lockscreen.cpp | 2 +- Marlin/src/lcd/e3v2/proui/meshviewer.cpp | 2 +- Marlin/src/lcd/e3v2/proui/plot.cpp | 2 +- Marlin/src/lcd/e3v2/proui/printstats.cpp | 2 +- .../anycubic_i3mega/anycubic_i3mega_lcd.cpp | 4 +- .../lcd/extui/dgus/mks/DGUSScreenHandler.cpp | 12 +- Marlin/src/lcd/extui/example/example.cpp | 2 +- .../cocoa_press/leveling_menu.cpp | 2 +- .../cocoa_press/main_menu.cpp | 4 +- .../ftdi_eve_lib/basic/commands.cpp | 2 +- .../extended/unicode/font_size_t.cpp | 2 +- .../extended/unicode/standard_char_set.cpp | 2 +- .../ftdi_eve_lib/extended/unicode/unicode.cpp | 2 +- .../generic/about_screen.cpp | 8 +- .../generic/advanced_settings_menu.cpp | 8 +- .../generic/endstop_state_screen.cpp | 2 +- .../generic/leveling_menu.cpp | 6 +- .../extui/ftdi_eve_touch_ui/generic/screens.h | 4 +- .../ftdi_eve_touch_ui/generic/tune_menu.cpp | 8 +- .../extui/ftdi_eve_touch_ui/theme/colors.h | 4 +- .../draw_auto_level_offset_settings.cpp | 2 +- .../src/lcd/extui/mks_ui/draw_cloud_bind.cpp | 2 +- .../lcd/extui/mks_ui/draw_jerk_settings.cpp | 2 +- .../lcd/extui/mks_ui/draw_media_select.cpp | 2 +- .../lcd/extui/mks_ui/draw_pause_message.cpp | 2 +- .../mks_ui/draw_tmc_current_settings.cpp | 2 +- .../mks_ui/draw_tmc_step_mode_settings.cpp | 2 +- .../extui/mks_ui/draw_touch_calibration.cpp | 2 +- Marlin/src/lcd/extui/mks_ui/draw_ui.cpp | 2 +- .../lcd/extui/mks_ui/draw_z_offset_wizard.cpp | 2 +- Marlin/src/lcd/extui/mks_ui/irq_overrid.cpp | 2 +- Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp | 2 +- Marlin/src/lcd/extui/mks_ui/mks_hardware.h | 2 +- .../extui/mks_ui/tft_lvgl_configuration.cpp | 4 +- .../src/lcd/extui/mks_ui/wifiSerial_STM32.cpp | 2 +- .../lcd/extui/mks_ui/wifiSerial_STM32F1.cpp | 2 +- Marlin/src/lcd/extui/mks_ui/wifi_module.cpp | 2 +- Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp | 2 +- Marlin/src/lcd/extui/nextion/nextion_tft.cpp | 4 +- Marlin/src/lcd/extui/ui_api.cpp | 2 +- Marlin/src/lcd/marlinui.cpp | 42 ++--- Marlin/src/lcd/marlinui.h | 28 +-- Marlin/src/lcd/menu/menu.cpp | 2 +- Marlin/src/lcd/menu/menu_advanced.cpp | 8 +- Marlin/src/lcd/menu/menu_backlash.cpp | 4 +- Marlin/src/lcd/menu/menu_bed_corners.cpp | 2 +- Marlin/src/lcd/menu/menu_bed_leveling.cpp | 6 +- Marlin/src/lcd/menu/menu_cancelobject.cpp | 2 +- Marlin/src/lcd/menu/menu_configuration.cpp | 4 +- Marlin/src/lcd/menu/menu_delta_calibrate.cpp | 2 +- Marlin/src/lcd/menu/menu_filament.cpp | 2 +- Marlin/src/lcd/menu/menu_info.cpp | 2 +- Marlin/src/lcd/menu/menu_job_recovery.cpp | 2 +- Marlin/src/lcd/menu/menu_led.cpp | 2 +- Marlin/src/lcd/menu/menu_main.cpp | 10 +- Marlin/src/lcd/menu/menu_media.cpp | 2 +- Marlin/src/lcd/menu/menu_mixer.cpp | 2 +- Marlin/src/lcd/menu/menu_mmu2.cpp | 2 +- Marlin/src/lcd/menu/menu_motion.cpp | 8 +- Marlin/src/lcd/menu/menu_password.cpp | 2 +- Marlin/src/lcd/menu/menu_temperature.cpp | 2 +- Marlin/src/lcd/menu/menu_touch_screen.cpp | 2 +- Marlin/src/lcd/menu/menu_tramming.cpp | 2 +- Marlin/src/lcd/menu/menu_tune.cpp | 2 +- Marlin/src/lcd/menu/menu_ubl.cpp | 2 +- Marlin/src/lcd/menu/menu_x_twist.cpp | 2 +- Marlin/src/lcd/tft/ui_1024x600.cpp | 8 +- Marlin/src/lcd/tft/ui_320x240.cpp | 8 +- Marlin/src/lcd/tft/ui_480x320.cpp | 8 +- Marlin/src/libs/nozzle.cpp | 4 +- Marlin/src/module/endstops.cpp | 10 +- Marlin/src/module/motion.cpp | 22 +-- Marlin/src/module/motion.h | 2 +- Marlin/src/module/planner.cpp | 18 +- Marlin/src/module/planner.h | 2 +- Marlin/src/module/printcounter.h | 2 +- Marlin/src/module/probe.cpp | 18 +- Marlin/src/module/probe.h | 2 +- Marlin/src/module/scara.cpp | 2 +- Marlin/src/module/settings.cpp | 18 +- Marlin/src/module/stepper.cpp | 20 +- Marlin/src/module/stepper.h | 10 +- Marlin/src/module/temperature.cpp | 56 +++--- Marlin/src/module/temperature.h | 18 +- Marlin/src/module/tool_change.cpp | 6 +- Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 2 +- Marlin/src/pins/linux/pins_RAMPS_LINUX.h | 6 +- Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h | 2 +- Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 4 +- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 4 +- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 2 +- Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 8 +- Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h | 2 +- Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h | 2 +- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 2 +- .../src/pins/lpc1769/pins_COHESION3D_REMIX.h | 2 +- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 2 +- Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h | 2 +- Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h | 2 +- Marlin/src/pins/pins.h | 2 +- Marlin/src/pins/pinsDebug.h | 8 +- Marlin/src/pins/rambo/pins_RAMBO.h | 2 +- Marlin/src/pins/rambo/pins_SCOOVO_X9H.h | 2 +- Marlin/src/pins/ramps/pins_3DRAG.h | 2 +- Marlin/src/pins/ramps/pins_AZTEEG_X3.h | 2 +- Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h | 4 +- Marlin/src/pins/ramps/pins_FYSETC_F6_13.h | 2 +- Marlin/src/pins/ramps/pins_K8400.h | 2 +- Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h | 2 +- Marlin/src/pins/ramps/pins_MKS_GEN_13.h | 2 +- Marlin/src/pins/ramps/pins_RAMPS.h | 20 +- Marlin/src/pins/ramps/pins_RUMBA.h | 4 +- Marlin/src/pins/ramps/pins_TRIGORILLA_14.h | 6 +- Marlin/src/pins/ramps/pins_TT_OSCAR.h | 6 +- Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h | 10 +- Marlin/src/pins/ramps/pins_ZRIB_V53.h | 4 +- Marlin/src/pins/sam/env_validate.h | 2 +- Marlin/src/pins/sam/pins_KRATOS32.h | 2 +- Marlin/src/pins/sam/pins_RADDS.h | 2 +- Marlin/src/pins/sam/pins_RAMPS_DUO.h | 2 +- Marlin/src/pins/sam/pins_RAMPS_FD_V1.h | 4 +- Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 4 +- Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 4 +- .../src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h | 10 +- Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h | 10 +- Marlin/src/pins/samd/pins_MINITRONICS20.h | 10 +- Marlin/src/pins/samd/pins_RAMPS_144.h | 10 +- .../src/pins/sanguino/pins_MELZI_CREALITY.h | 4 +- Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h | 2 +- .../src/pins/sanguino/pins_SANGUINOLOLU_11.h | 4 +- Marlin/src/pins/sanguino/pins_ZMIB_V2.h | 10 +- Marlin/src/pins/sensitive_pins.h | 2 +- Marlin/src/pins/stm32f1/pins_BEAST.h | 2 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 8 +- .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 8 +- .../src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 6 +- .../src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 2 +- Marlin/src/pins/stm32f1/pins_CHITU3D.h | 4 +- .../pins/stm32f1/pins_CREALITY_V24S1_301.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 4 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V521.h | 2 +- .../src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h | 8 +- Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 2 +- Marlin/src/pins/stm32f1/pins_FLY_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h | 2 +- Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h | 4 +- Marlin/src/pins/stm32f1/pins_GTM32_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h | 2 +- Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h | 2 +- Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h | 2 +- .../pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 2 +- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h | 6 +- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 2 +- .../pins/stm32f1/pins_MKS_ROBIN_NANO_common.h | 2 +- Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h | 6 +- Marlin/src/pins/stm32f1/pins_STM32F1R.h | 2 +- Marlin/src/pins/stm32f1/pins_STM3R_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h | 2 +- Marlin/src/pins/stm32f4/pins_ARMED.h | 2 +- Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h | 4 +- .../src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 2 +- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 6 +- Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 2 +- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 6 +- .../stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h | 8 +- .../pins/stm32f4/pins_BTT_SKR_PRO_common.h | 6 +- .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 6 +- .../pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 4 +- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 2 +- .../pins/stm32f4/pins_MKS_MONSTER8_common.h | 2 +- .../stm32f4/pins_MKS_ROBIN_NANO_V3_common.h | 2 +- Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h | 4 +- .../src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h | 4 +- Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h | 2 +- .../pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h | 6 +- .../pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_M8P_common.h | 6 +- .../pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h | 8 +- .../pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h | 6 +- .../pins/stm32h7/pins_BTT_SKR_V3_0_common.h | 8 +- Marlin/src/pins/teensy2/pins_PRINTRBOARD.h | 2 +- .../src/pins/teensy2/pins_PRINTRBOARD_REVF.h | 2 +- Marlin/src/pins/teensy2/pins_SAV_MKI.h | 2 +- Marlin/src/sd/Sd2Card.h | 2 +- Marlin/src/sd/cardreader.cpp | 8 +- Marlin/src/sd/cardreader.h | 2 +- .../sd/usb_flashdrive/Sd2Card_FlashDrive.h | 2 +- .../PlatformIO/scripts/common-dependencies.h | 6 +- 296 files changed, 864 insertions(+), 864 deletions(-) diff --git a/Marlin/src/HAL/AVR/MarlinSerial.h b/Marlin/src/HAL/AVR/MarlinSerial.h index 7eb76000d66e..b248851f5bbb 100644 --- a/Marlin/src/HAL/AVR/MarlinSerial.h +++ b/Marlin/src/HAL/AVR/MarlinSerial.h @@ -283,7 +283,7 @@ static constexpr bool DROPPED_RX = false; static constexpr bool RX_FRAMING_ERRORS = false; static constexpr bool MAX_RX_QUEUED = false; - static constexpr bool RX_OVERRUNS = BOTH(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS); + static constexpr bool RX_OVERRUNS = ALL(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS); }; typedef Serial1Class< MarlinSerial< LCDSerialCfg > > MSerialLCD; diff --git a/Marlin/src/HAL/AVR/eeprom.cpp b/Marlin/src/HAL/AVR/eeprom.cpp index 8d084dec7fdf..6465e4702544 100644 --- a/Marlin/src/HAL/AVR/eeprom.cpp +++ b/Marlin/src/HAL/AVR/eeprom.cpp @@ -23,7 +23,7 @@ #include "../../inc/MarlinConfig.h" -#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE) +#if ANY(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE) /** * PersistentStore for Arduino-style EEPROM interface diff --git a/Marlin/src/HAL/AVR/inc/SanityCheck.h b/Marlin/src/HAL/AVR/inc/SanityCheck.h index e66de96047a5..826c094ea45b 100644 --- a/Marlin/src/HAL/AVR/inc/SanityCheck.h +++ b/Marlin/src/HAL/AVR/inc/SanityCheck.h @@ -95,11 +95,11 @@ /** * The Trinamic library includes SoftwareSerial.h, leading to a compile error. */ -#if BOTH(HAS_TRINAMIC_CONFIG, ENDSTOP_INTERRUPTS_FEATURE) +#if ALL(HAS_TRINAMIC_CONFIG, ENDSTOP_INTERRUPTS_FEATURE) #error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif -#if BOTH(HAS_TMC_SW_SERIAL, MONITOR_DRIVER_STATUS) +#if ALL(HAS_TMC_SW_SERIAL, MONITOR_DRIVER_STATUS) #error "MONITOR_DRIVER_STATUS causes performance issues when used with SoftwareSerial-connected drivers. Disable MONITOR_DRIVER_STATUS or use hardware serial to continue." #endif diff --git a/Marlin/src/HAL/DUE/HAL_SPI.cpp b/Marlin/src/HAL/DUE/HAL_SPI.cpp index f5bcaacee505..63ebf164f2b1 100644 --- a/Marlin/src/HAL/DUE/HAL_SPI.cpp +++ b/Marlin/src/HAL/DUE/HAL_SPI.cpp @@ -42,7 +42,7 @@ // Public functions // ------------------------ -#if EITHER(DUE_SOFTWARE_SPI, FORCE_SOFT_SPI) +#if ANY(DUE_SOFTWARE_SPI, FORCE_SOFT_SPI) // ------------------------ // Software SPI diff --git a/Marlin/src/HAL/DUE/inc/Conditionals_post.h b/Marlin/src/HAL/DUE/inc/Conditionals_post.h index ce6d3fdde27f..295596b78b19 100644 --- a/Marlin/src/HAL/DUE/inc/Conditionals_post.h +++ b/Marlin/src/HAL/DUE/inc/Conditionals_post.h @@ -23,6 +23,6 @@ #if USE_FALLBACK_EEPROM #define FLASH_EEPROM_EMULATION -#elif EITHER(I2C_EEPROM, SPI_EEPROM) +#elif ANY(I2C_EEPROM, SPI_EEPROM) #define USE_SHARED_EEPROM 1 #endif diff --git a/Marlin/src/HAL/ESP32/HAL.cpp b/Marlin/src/HAL/ESP32/HAL.cpp index 46dd4e761b8c..27f6516f9ae8 100644 --- a/Marlin/src/HAL/ESP32/HAL.cpp +++ b/Marlin/src/HAL/ESP32/HAL.cpp @@ -165,7 +165,7 @@ void MarlinHAL::init_board() { } void MarlinHAL::idletask() { - #if BOTH(WIFISUPPORT, OTASUPPORT) + #if ALL(WIFISUPPORT, OTASUPPORT) OTA_handle(); #endif TERN_(ESP3D_WIFISUPPORT, esp3dlib.idletask()); diff --git a/Marlin/src/HAL/ESP32/inc/SanityCheck.h b/Marlin/src/HAL/ESP32/inc/SanityCheck.h index 910918b9ea47..e6c364a6fe4c 100644 --- a/Marlin/src/HAL/ESP32/inc/SanityCheck.h +++ b/Marlin/src/HAL/ESP32/inc/SanityCheck.h @@ -40,7 +40,7 @@ #error "TMC220x Software Serial is not supported on ESP32." #endif -#if BOTH(WIFISUPPORT, ESP3D_WIFISUPPORT) +#if ALL(WIFISUPPORT, ESP3D_WIFISUPPORT) #error "Only enable one WiFi option, either WIFISUPPORT or ESP3D_WIFISUPPORT." #endif @@ -52,7 +52,7 @@ #error "FAST_PWM_FAN is not available on TinyBee." #endif -#if BOTH(I2S_STEPPER_STREAM, BABYSTEPPING) && DISABLED(INTEGRATED_BABYSTEPPING) +#if ALL(I2S_STEPPER_STREAM, BABYSTEPPING) && DISABLED(INTEGRATED_BABYSTEPPING) #error "BABYSTEPPING on I2S stream requires INTEGRATED_BABYSTEPPING." #endif @@ -60,10 +60,10 @@ #error "PULLDOWN pin mode is not available on ESP32 boards." #endif -#if BOTH(I2S_STEPPER_STREAM, LIN_ADVANCE) && DISABLED(EXPERIMENTAL_I2S_LA) +#if ALL(I2S_STEPPER_STREAM, LIN_ADVANCE) && DISABLED(EXPERIMENTAL_I2S_LA) #error "I2S stream is currently incompatible with LIN_ADVANCE." #endif -#if BOTH(I2S_STEPPER_STREAM, PRINTCOUNTER) && PRINTCOUNTER_SAVE_INTERVAL > 0 && DISABLED(PRINTCOUNTER_SYNC) +#if ALL(I2S_STEPPER_STREAM, PRINTCOUNTER) && PRINTCOUNTER_SAVE_INTERVAL > 0 && DISABLED(PRINTCOUNTER_SYNC) #error "PRINTCOUNTER_SAVE_INTERVAL may cause issues on ESP32 with an I2S expander. Define PRINTCOUNTER_SYNC in Configuration.h for an imperfect solution." #endif diff --git a/Marlin/src/HAL/ESP32/ota.cpp b/Marlin/src/HAL/ESP32/ota.cpp index 69a3e25e5631..99516bfc6ee6 100644 --- a/Marlin/src/HAL/ESP32/ota.cpp +++ b/Marlin/src/HAL/ESP32/ota.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(WIFISUPPORT, OTASUPPORT) +#if ALL(WIFISUPPORT, OTASUPPORT) #include #include diff --git a/Marlin/src/HAL/ESP32/spiffs.cpp b/Marlin/src/HAL/ESP32/spiffs.cpp index a0e713bff0bb..043ad7849adb 100644 --- a/Marlin/src/HAL/ESP32/spiffs.cpp +++ b/Marlin/src/HAL/ESP32/spiffs.cpp @@ -23,7 +23,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(WIFISUPPORT, WEBSUPPORT) +#if ALL(WIFISUPPORT, WEBSUPPORT) #include "../../core/serial.h" diff --git a/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp b/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp index bd7ecdc9f217..60be398adba9 100644 --- a/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp +++ b/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp @@ -25,7 +25,7 @@ #include "../../inc/MarlinConfig.h" -#if EITHER(MKS_MINI_12864, FYSETC_MINI_12864_2_1) +#if ANY(MKS_MINI_12864, FYSETC_MINI_12864_2_1) #include #include "../shared/HAL_SPI.h" @@ -101,6 +101,6 @@ uint8_t u8g_eps_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_pt return 1; } -#endif // EITHER(MKS_MINI_12864, FYSETC_MINI_12864_2_1) +#endif // ANY(MKS_MINI_12864, FYSETC_MINI_12864_2_1) #endif // ARDUINO_ARCH_ESP32 diff --git a/Marlin/src/HAL/ESP32/web.cpp b/Marlin/src/HAL/ESP32/web.cpp index 7a27707a3e14..63a101595ff7 100644 --- a/Marlin/src/HAL/ESP32/web.cpp +++ b/Marlin/src/HAL/ESP32/web.cpp @@ -23,7 +23,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(WIFISUPPORT, WEBSUPPORT) +#if ALL(WIFISUPPORT, WEBSUPPORT) #include "../../inc/MarlinConfig.h" diff --git a/Marlin/src/HAL/LINUX/spi_pins.h b/Marlin/src/HAL/LINUX/spi_pins.h index 9b406518738c..fab86bd02bac 100644 --- a/Marlin/src/HAL/LINUX/spi_pins.h +++ b/Marlin/src/HAL/LINUX/spi_pins.h @@ -24,7 +24,7 @@ #include "../../core/macros.h" #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) +#if ALL(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently // needed due to the speed and mode required for communicating with each device being different. // This requirement can be removed if the SPI access to these devices is updated to use diff --git a/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h b/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h index a0bf4215383e..0b03cb2aea63 100644 --- a/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h +++ b/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h @@ -23,7 +23,7 @@ #if USE_FALLBACK_EEPROM #define FLASH_EEPROM_EMULATION -#elif EITHER(I2C_EEPROM, SPI_EEPROM) +#elif ANY(I2C_EEPROM, SPI_EEPROM) #define USE_SHARED_EEPROM 1 #endif diff --git a/Marlin/src/HAL/LPC1768/spi_pins.h b/Marlin/src/HAL/LPC1768/spi_pins.h index a82b21dda91f..9a53425420b2 100644 --- a/Marlin/src/HAL/LPC1768/spi_pins.h +++ b/Marlin/src/HAL/LPC1768/spi_pins.h @@ -23,7 +23,7 @@ #include "../../core/macros.h" -#if BOTH(SDSUPPORT, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) +#if ALL(SDSUPPORT, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently // needed due to the speed and mode required for communicating with each device being different. // This requirement can be removed if the SPI access to these devices is updated to use diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp index f116a9b80aa6..bee1876f226e 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp @@ -132,7 +132,7 @@ uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, const pin_t sck static uint8_t SPI_speed = 0; static void u8g_sw_spi_HAL_LPC1768_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) { - #if EITHER(FYSETC_MINI_12864, MKS_MINI_12864) + #if ANY(FYSETC_MINI_12864, MKS_MINI_12864) swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin); #else swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin); @@ -160,7 +160,7 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, break; case U8G_COM_MSG_CHIP_SELECT: - #if EITHER(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0 + #if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0 if (arg_val) { // SCK idle state needs to be set to the proper idle state before // the next chip select goes active u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active diff --git a/Marlin/src/HAL/NATIVE_SIM/spi_pins.h b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h index fd3378b33759..12f630f9d61e 100644 --- a/Marlin/src/HAL/NATIVE_SIM/spi_pins.h +++ b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h @@ -24,7 +24,7 @@ #include "../../core/macros.h" #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) +#if ALL(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently // needed due to the speed and mode required for communicating with each device being different. // This requirement can be removed if the SPI access to these devices is updated to use diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp index 7be84580b133..126893e3caa1 100644 --- a/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp @@ -131,7 +131,7 @@ static uint8_t swSpiInit(const uint8_t spi_speed, const uint8_t clk_pin, const u } static void u8g_sw_spi_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) { - #if EITHER(FYSETC_MINI_12864, MKS_MINI_12864) + #if ANY(FYSETC_MINI_12864, MKS_MINI_12864) swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin); #else swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin); @@ -159,7 +159,7 @@ uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_pt break; case U8G_COM_MSG_CHIP_SELECT: - #if EITHER(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0 + #if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0 if (arg_val) { // SCK idle state needs to be set to the proper idle state before // the next chip select goes active u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active diff --git a/Marlin/src/HAL/SAMD21/HAL_SPI.cpp b/Marlin/src/HAL/SAMD21/HAL_SPI.cpp index 69c6a43af835..e01f540cf8a1 100644 --- a/Marlin/src/HAL/SAMD21/HAL_SPI.cpp +++ b/Marlin/src/HAL/SAMD21/HAL_SPI.cpp @@ -45,7 +45,7 @@ // Public functions // -------------------------------------------------------------------------- -#if EITHER(SOFTWARE_SPI, FORCE_SOFT_SPI) +#if ANY(SOFTWARE_SPI, FORCE_SOFT_SPI) // ------------------------ // Software SPI diff --git a/Marlin/src/HAL/SAMD21/inc/Conditionals_post.h b/Marlin/src/HAL/SAMD21/inc/Conditionals_post.h index 7315dc12a779..87d3350c9450 100644 --- a/Marlin/src/HAL/SAMD21/inc/Conditionals_post.h +++ b/Marlin/src/HAL/SAMD21/inc/Conditionals_post.h @@ -28,6 +28,6 @@ #if USE_FALLBACK_EEPROM #define FLASH_EEPROM_EMULATION -#elif EITHER(I2C_EEPROM, SPI_EEPROM) +#elif ANY(I2C_EEPROM, SPI_EEPROM) #define USE_SHARED_EEPROM 1 #endif diff --git a/Marlin/src/HAL/SAMD51/HAL_SPI.cpp b/Marlin/src/HAL/SAMD51/HAL_SPI.cpp index 58fdfe9499a1..63d3971965c9 100644 --- a/Marlin/src/HAL/SAMD51/HAL_SPI.cpp +++ b/Marlin/src/HAL/SAMD51/HAL_SPI.cpp @@ -44,7 +44,7 @@ // Public functions // -------------------------------------------------------------------------- -#if EITHER(SOFTWARE_SPI, FORCE_SOFT_SPI) +#if ANY(SOFTWARE_SPI, FORCE_SOFT_SPI) // ------------------------ // Software SPI diff --git a/Marlin/src/HAL/SAMD51/inc/Conditionals_post.h b/Marlin/src/HAL/SAMD51/inc/Conditionals_post.h index ce6d3fdde27f..295596b78b19 100644 --- a/Marlin/src/HAL/SAMD51/inc/Conditionals_post.h +++ b/Marlin/src/HAL/SAMD51/inc/Conditionals_post.h @@ -23,6 +23,6 @@ #if USE_FALLBACK_EEPROM #define FLASH_EEPROM_EMULATION -#elif EITHER(I2C_EEPROM, SPI_EEPROM) +#elif ANY(I2C_EEPROM, SPI_EEPROM) #define USE_SHARED_EEPROM 1 #endif diff --git a/Marlin/src/HAL/STM32/inc/Conditionals_adv.h b/Marlin/src/HAL/STM32/inc/Conditionals_adv.h index 451c94f25d1f..d81b1f1c8c89 100644 --- a/Marlin/src/HAL/STM32/inc/Conditionals_adv.h +++ b/Marlin/src/HAL/STM32/inc/Conditionals_adv.h @@ -21,7 +21,7 @@ */ #pragma once -#if BOTH(SDSUPPORT, USBD_USE_CDC_MSC) && DISABLED(NO_SD_HOST_DRIVE) +#if ALL(SDSUPPORT, USBD_USE_CDC_MSC) && DISABLED(NO_SD_HOST_DRIVE) #define HAS_SD_HOST_DRIVE 1 #endif diff --git a/Marlin/src/HAL/STM32/inc/Conditionals_post.h b/Marlin/src/HAL/STM32/inc/Conditionals_post.h index 83ce077c754d..6c97a635b3cc 100644 --- a/Marlin/src/HAL/STM32/inc/Conditionals_post.h +++ b/Marlin/src/HAL/STM32/inc/Conditionals_post.h @@ -24,7 +24,7 @@ // If no real or emulated EEPROM selected, fall back to SD emulation #if USE_FALLBACK_EEPROM #define SDCARD_EEPROM_EMULATION -#elif EITHER(I2C_EEPROM, SPI_EEPROM) +#elif ANY(I2C_EEPROM, SPI_EEPROM) #define USE_SHARED_EEPROM 1 #endif diff --git a/Marlin/src/HAL/STM32/usb_host.cpp b/Marlin/src/HAL/STM32/usb_host.cpp index f3784670049c..afafe1d4f3d1 100644 --- a/Marlin/src/HAL/STM32/usb_host.cpp +++ b/Marlin/src/HAL/STM32/usb_host.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfig.h" -#if BOTH(USE_OTG_USB_HOST, USBHOST) +#if ALL(USE_OTG_USB_HOST, USBHOST) #include "usb_host.h" #include "../shared/Marduino.h" diff --git a/Marlin/src/HAL/STM32F1/HAL.cpp b/Marlin/src/HAL/STM32F1/HAL.cpp index 4d3140001e82..e8e958478fef 100644 --- a/Marlin/src/HAL/STM32F1/HAL.cpp +++ b/Marlin/src/HAL/STM32F1/HAL.cpp @@ -224,7 +224,7 @@ void MarlinHAL::init() { #endif #if HAS_SD_HOST_DRIVE MSC_SD_init(); - #elif BOTH(SERIAL_USB, EMERGENCY_PARSER) + #elif ALL(SERIAL_USB, EMERGENCY_PARSER) usb_cdcacm_set_hooks(USB_CDCACM_HOOK_RX, my_rx_callback); #endif #if PIN_EXISTS(USB_CONNECT) diff --git a/Marlin/src/HAL/STM32F1/HAL.h b/Marlin/src/HAL/STM32F1/HAL.h index b14b5f7e7926..80002e880788 100644 --- a/Marlin/src/HAL/STM32F1/HAL.h +++ b/Marlin/src/HAL/STM32F1/HAL.h @@ -82,7 +82,7 @@ #define _MSERIAL(X) MSerial##X #define MSERIAL(X) _MSERIAL(X) -#if EITHER(STM32_HIGH_DENSITY, STM32_XL_DENSITY) +#if ANY(STM32_HIGH_DENSITY, STM32_XL_DENSITY) #define NUM_UARTS 5 #else #define NUM_UARTS 3 diff --git a/Marlin/src/HAL/STM32F1/MarlinSerial.cpp b/Marlin/src/HAL/STM32F1/MarlinSerial.cpp index 6dabcde51ead..9e1e07c72421 100644 --- a/Marlin/src/HAL/STM32F1/MarlinSerial.cpp +++ b/Marlin/src/HAL/STM32F1/MarlinSerial.cpp @@ -116,7 +116,7 @@ constexpr bool serial_handles_emergency(int port) { #endif DEFINE_HWSERIAL_MARLIN(MSerial2, 2); DEFINE_HWSERIAL_MARLIN(MSerial3, 3); -#if EITHER(STM32_HIGH_DENSITY, STM32_XL_DENSITY) +#if ANY(STM32_HIGH_DENSITY, STM32_XL_DENSITY) DEFINE_HWSERIAL_UART_MARLIN(MSerial4, 4); DEFINE_HWSERIAL_UART_MARLIN(MSerial5, 5); #endif diff --git a/Marlin/src/HAL/STM32F1/MarlinSerial.h b/Marlin/src/HAL/STM32F1/MarlinSerial.h index dda32fe7a2ef..53bcd4847638 100644 --- a/Marlin/src/HAL/STM32F1/MarlinSerial.h +++ b/Marlin/src/HAL/STM32F1/MarlinSerial.h @@ -52,7 +52,7 @@ typedef Serial1Class MSerialT; extern MSerialT MSerial1; extern MSerialT MSerial2; extern MSerialT MSerial3; -#if EITHER(STM32_HIGH_DENSITY, STM32_XL_DENSITY) +#if ANY(STM32_HIGH_DENSITY, STM32_XL_DENSITY) extern MSerialT MSerial4; extern MSerialT MSerial5; #endif diff --git a/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp b/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp index 26ea1ea19af9..db9b6f0b1c8d 100644 --- a/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp +++ b/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp @@ -24,7 +24,7 @@ #include "../../../inc/MarlinConfig.h" -#if BOTH(HAS_MARLINUI_U8GLIB, FORCE_SOFT_SPI) +#if ALL(HAS_MARLINUI_U8GLIB, FORCE_SOFT_SPI) #include #include "../../shared/HAL_SPI.h" diff --git a/Marlin/src/HAL/STM32F1/inc/Conditionals_post.h b/Marlin/src/HAL/STM32F1/inc/Conditionals_post.h index 656fbe1ce259..85b340288d2a 100644 --- a/Marlin/src/HAL/STM32F1/inc/Conditionals_post.h +++ b/Marlin/src/HAL/STM32F1/inc/Conditionals_post.h @@ -24,7 +24,7 @@ // If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation #if USE_FALLBACK_EEPROM #define SDCARD_EEPROM_EMULATION -#elif EITHER(I2C_EEPROM, SPI_EEPROM) +#elif ANY(I2C_EEPROM, SPI_EEPROM) #define USE_SHARED_EEPROM 1 #endif diff --git a/Marlin/src/HAL/STM32F1/pinsDebug.h b/Marlin/src/HAL/STM32F1/pinsDebug.h index 7828479658a9..9971b32ec5f8 100644 --- a/Marlin/src/HAL/STM32F1/pinsDebug.h +++ b/Marlin/src/HAL/STM32F1/pinsDebug.h @@ -98,7 +98,7 @@ static void pwm_details(const pin_t pin) { timer_dev * const tdev = PIN_MAP[pin].timer_device; const uint8_t channel = PIN_MAP[pin].timer_channel; const char num = ( - #if EITHER(STM32_HIGH_DENSITY, STM32_XL_DENSITY) + #if ANY(STM32_HIGH_DENSITY, STM32_XL_DENSITY) tdev == &timer8 ? '8' : tdev == &timer5 ? '5' : #endif diff --git a/Marlin/src/HAL/STM32F1/sdio.cpp b/Marlin/src/HAL/STM32F1/sdio.cpp index 6e41d2cbf1b4..95184c393556 100644 --- a/Marlin/src/HAL/STM32F1/sdio.cpp +++ b/Marlin/src/HAL/STM32F1/sdio.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfig.h" // Allow pins/pins.h to set density -#if EITHER(STM32_HIGH_DENSITY, STM32_XL_DENSITY) +#if ANY(STM32_HIGH_DENSITY, STM32_XL_DENSITY) #include "sdio.h" diff --git a/Marlin/src/HAL/shared/HAL_ST7920.h b/Marlin/src/HAL/shared/HAL_ST7920.h index 4e362f96ba55..305736c3a514 100644 --- a/Marlin/src/HAL/shared/HAL_ST7920.h +++ b/Marlin/src/HAL/shared/HAL_ST7920.h @@ -27,7 +27,7 @@ * (bypassing U8G), it will allow the LIGHTWEIGHT_UI to operate. */ -#if BOTH(HAS_MARLINUI_U8GLIB, LIGHTWEIGHT_UI) +#if ALL(HAS_MARLINUI_U8GLIB, LIGHTWEIGHT_UI) void ST7920_cs(); void ST7920_ncs(); void ST7920_set_cmd(); diff --git a/Marlin/src/HAL/shared/eeprom_api.cpp b/Marlin/src/HAL/shared/eeprom_api.cpp index 47cfa5a2dbe0..083ccc70d7c9 100644 --- a/Marlin/src/HAL/shared/eeprom_api.cpp +++ b/Marlin/src/HAL/shared/eeprom_api.cpp @@ -22,7 +22,7 @@ */ #include "../../inc/MarlinConfigPre.h" -#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE) +#if ANY(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE) #include "eeprom_api.h" PersistentStore persistentStore; diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 0ca4199fcd6d..34a07c817ff8 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -194,7 +194,7 @@ #include "feature/runout.h" #endif -#if EITHER(PROBE_TARE, HAS_Z_SERVO_PROBE) +#if ANY(PROBE_TARE, HAS_Z_SERVO_PROBE) #include "module/probe.h" #endif @@ -940,7 +940,7 @@ void minkill(const bool steppers_off/*=false*/) { TERN_(HAS_SUICIDE, suicide()); - #if EITHER(HAS_KILL, SOFT_RESET_ON_KILL) + #if ANY(HAS_KILL, SOFT_RESET_ON_KILL) // Wait for both KILL and ENC to be released while (TERN0(HAS_KILL, kill_state()) || TERN0(SOFT_RESET_ON_KILL, ui.button_pressed())) @@ -969,7 +969,7 @@ void stop() { print_job_timer.stop(); - #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) + #if ANY(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) thermalManager.set_fans_paused(false); // Un-pause fans for safety #endif @@ -1331,14 +1331,14 @@ void setup() { #endif #endif - #if BOTH(SDSUPPORT, SDCARD_EEPROM_EMULATION) + #if ALL(SDSUPPORT, SDCARD_EEPROM_EMULATION) SETUP_RUN(card.mount()); // Mount media with settings before first_load #endif SETUP_RUN(settings.first_load()); // Load data from EEPROM if available (or use defaults) // This also updates variables in the planner, elsewhere - #if BOTH(HAS_WIRED_LCD, SHOW_BOOTSCREEN) + #if ALL(HAS_WIRED_LCD, SHOW_BOOTSCREEN) SETUP_RUN(ui.show_bootscreen()); const millis_t bootscreen_ms = millis(); #endif @@ -1413,7 +1413,7 @@ void setup() { SETUP_RUN(stepper_dac.init()); #endif - #if EITHER(Z_PROBE_SLED, SOLENOID_PROBE) && HAS_SOLENOID_1 + #if ANY(Z_PROBE_SLED, SOLENOID_PROBE) && HAS_SOLENOID_1 OUT_WRITE(SOL1_PIN, LOW); // OFF #endif @@ -1621,7 +1621,7 @@ void setup() { SETUP_RUN(tft_lvgl_init()); #endif - #if BOTH(HAS_WIRED_LCD, SHOW_BOOTSCREEN) + #if ALL(HAS_WIRED_LCD, SHOW_BOOTSCREEN) const millis_t elapsed = millis() - bootscreen_ms; #if ENABLED(MARLIN_DEV_MODE) SERIAL_ECHOLNPGM("elapsed=", elapsed); @@ -1633,7 +1633,7 @@ void setup() { SETUP_RUN(password.lock_machine()); // Will not proceed until correct password provided #endif - #if BOTH(HAS_MARLINUI_MENU, TOUCH_SCREEN_CALIBRATION) && EITHER(TFT_CLASSIC_UI, TFT_COLOR_UI) + #if ALL(HAS_MARLINUI_MENU, TOUCH_SCREEN_CALIBRATION) && ANY(TFT_CLASSIC_UI, TFT_COLOR_UI) SETUP_RUN(ui.check_touch_calibration()); #endif @@ -1680,7 +1680,7 @@ void loop() { queue.advance(); - #if EITHER(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN) + #if ANY(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN) powerManager.checkAutoPowerOff(); #endif diff --git a/Marlin/src/core/language.h b/Marlin/src/core/language.h index 58d9eb5848a5..3a44299e879f 100644 --- a/Marlin/src/core/language.h +++ b/Marlin/src/core/language.h @@ -503,7 +503,7 @@ #define STR_W "" #endif -#if EITHER(HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL) +#if ANY(HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL) // Custom characters defined in the first 8 characters of the LCD #define LCD_STR_BEDTEMP "\x00" // Print only as a char. This will have 'unexpected' results when used in a string! diff --git a/Marlin/src/feature/babystep.h b/Marlin/src/feature/babystep.h index bbf0c5a26060..37d774a683c5 100644 --- a/Marlin/src/feature/babystep.h +++ b/Marlin/src/feature/babystep.h @@ -31,7 +31,7 @@ #define BABYSTEP_TICKS ((TEMP_TIMER_RATE) / (BABYSTEPS_PER_SEC)) #endif -#if IS_CORE || EITHER(BABYSTEP_XY, I2C_POSITION_ENCODERS) +#if IS_CORE || ANY(BABYSTEP_XY, I2C_POSITION_ENCODERS) #define BS_AXIS_IND(A) A #define BS_AXIS(I) AxisEnum(I) #else diff --git a/Marlin/src/feature/backlash.cpp b/Marlin/src/feature/backlash.cpp index 13e2cd99eccb..2aa78e6c14bb 100644 --- a/Marlin/src/feature/backlash.cpp +++ b/Marlin/src/feature/backlash.cpp @@ -66,7 +66,7 @@ Backlash backlash; void Backlash::add_correction_steps(const int32_t &da, const int32_t &db, const int32_t &dc, const axis_bits_t dm, block_t * const block) { axis_bits_t changed_dir = last_direction_bits ^ dm; // Ignore direction change unless steps are taken in that direction - #if DISABLED(CORE_BACKLASH) || EITHER(MARKFORGED_XY, MARKFORGED_YX) + #if DISABLED(CORE_BACKLASH) || ANY(MARKFORGED_XY, MARKFORGED_YX) if (!da) CBI(changed_dir, X_AXIS); if (!db) CBI(changed_dir, Y_AXIS); if (!dc) CBI(changed_dir, Z_AXIS); diff --git a/Marlin/src/feature/bedlevel/bedlevel.cpp b/Marlin/src/feature/bedlevel/bedlevel.cpp index 03b67745ec16..0bb8b8191a5e 100644 --- a/Marlin/src/feature/bedlevel/bedlevel.cpp +++ b/Marlin/src/feature/bedlevel/bedlevel.cpp @@ -27,7 +27,7 @@ #include "bedlevel.h" #include "../../module/planner.h" -#if EITHER(MESH_BED_LEVELING, PROBE_MANUALLY) +#if ANY(MESH_BED_LEVELING, PROBE_MANUALLY) #include "../../module/motion.h" #endif @@ -120,7 +120,7 @@ void reset_bed_level() { TERN_(ABL_PLANAR, planner.bed_level_matrix.set_to_identity()); } -#if EITHER(AUTO_BED_LEVELING_BILINEAR, MESH_BED_LEVELING) +#if ANY(AUTO_BED_LEVELING_BILINEAR, MESH_BED_LEVELING) /** * Enable to produce output in JSON format suitable @@ -188,7 +188,7 @@ void reset_bed_level() { #endif // AUTO_BED_LEVELING_BILINEAR || MESH_BED_LEVELING -#if EITHER(MESH_BED_LEVELING, PROBE_MANUALLY) +#if ANY(MESH_BED_LEVELING, PROBE_MANUALLY) void _manual_goto_xy(const xy_pos_t &pos) { diff --git a/Marlin/src/feature/bedlevel/bedlevel.h b/Marlin/src/feature/bedlevel/bedlevel.h index aeafec10d6ab..ccb9543e72e5 100644 --- a/Marlin/src/feature/bedlevel/bedlevel.h +++ b/Marlin/src/feature/bedlevel/bedlevel.h @@ -23,7 +23,7 @@ #include "../../inc/MarlinConfigPre.h" -#if EITHER(RESTORE_LEVELING_AFTER_G28, ENABLE_LEVELING_AFTER_G28) +#if ANY(RESTORE_LEVELING_AFTER_G28, ENABLE_LEVELING_AFTER_G28) #define CAN_SET_LEVELING_AFTER_G28 1 #endif @@ -41,7 +41,7 @@ void reset_bed_level(); void set_z_fade_height(const_float_t zfh, const bool do_report=true); #endif -#if EITHER(MESH_BED_LEVELING, PROBE_MANUALLY) +#if ANY(MESH_BED_LEVELING, PROBE_MANUALLY) void _manual_goto_xy(const xy_pos_t &pos); #endif @@ -69,7 +69,7 @@ class TemporaryBedLevelingState { #include "mbl/mesh_bed_leveling.h" #endif - #if EITHER(AUTO_BED_LEVELING_BILINEAR, MESH_BED_LEVELING) + #if ANY(AUTO_BED_LEVELING_BILINEAR, MESH_BED_LEVELING) #include diff --git a/Marlin/src/feature/cancel_object.cpp b/Marlin/src/feature/cancel_object.cpp index bffd2bb72020..9b658315ed8b 100644 --- a/Marlin/src/feature/cancel_object.cpp +++ b/Marlin/src/feature/cancel_object.cpp @@ -44,7 +44,7 @@ void CancelObject::set_active_object(const int8_t obj) { else skipping = false; - #if BOTH(HAS_STATUS_MESSAGE, CANCEL_OBJECTS_REPORTING) + #if ALL(HAS_STATUS_MESSAGE, CANCEL_OBJECTS_REPORTING) if (active_object >= 0) ui.status_printf(0, F(S_FMT " %i"), GET_TEXT(MSG_PRINTING_OBJECT), int(active_object)); else diff --git a/Marlin/src/feature/cooler.cpp b/Marlin/src/feature/cooler.cpp index e0f99777d19a..6c45e992262e 100644 --- a/Marlin/src/feature/cooler.cpp +++ b/Marlin/src/feature/cooler.cpp @@ -22,7 +22,7 @@ #include "../inc/MarlinConfig.h" -#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) +#if ANY(HAS_COOLER, LASER_COOLANT_FLOW_METER) #include "cooler.h" Cooler cooler; diff --git a/Marlin/src/feature/host_actions.cpp b/Marlin/src/feature/host_actions.cpp index 773b6ebc61a4..8748c41a5429 100644 --- a/Marlin/src/feature/host_actions.cpp +++ b/Marlin/src/feature/host_actions.cpp @@ -187,13 +187,13 @@ void HostUI::action(FSTR_P const fstr, const bool eol) { switch (response) { case 0: // "Purge More" button - #if BOTH(M600_PURGE_MORE_RESUMABLE, ADVANCED_PAUSE_FEATURE) + #if ALL(M600_PURGE_MORE_RESUMABLE, ADVANCED_PAUSE_FEATURE) pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; // Simulate menu selection (menu exits, doesn't extrude more) #endif break; case 1: // "Continue" / "Disable Runout" button - #if BOTH(M600_PURGE_MORE_RESUMABLE, ADVANCED_PAUSE_FEATURE) + #if ALL(M600_PURGE_MORE_RESUMABLE, ADVANCED_PAUSE_FEATURE) pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT; // Simulate menu selection #endif #if HAS_FILAMENT_SENSOR @@ -209,7 +209,7 @@ void HostUI::action(FSTR_P const fstr, const bool eol) { TERN_(HAS_RESUME_CONTINUE, wait_for_user = false); break; case PROMPT_PAUSE_RESUME: - #if BOTH(ADVANCED_PAUSE_FEATURE, SDSUPPORT) + #if ALL(ADVANCED_PAUSE_FEATURE, SDSUPPORT) extern const char M24_STR[]; queue.inject_P(M24_STR); #endif diff --git a/Marlin/src/feature/leds/leds.cpp b/Marlin/src/feature/leds/leds.cpp index 3753235ab5e7..1e0cd6dd2973 100644 --- a/Marlin/src/feature/leds/leds.cpp +++ b/Marlin/src/feature/leds/leds.cpp @@ -30,7 +30,7 @@ #include "leds.h" -#if EITHER(CASE_LIGHT_USE_RGB_LED, CASE_LIGHT_USE_NEOPIXEL) +#if ANY(CASE_LIGHT_USE_RGB_LED, CASE_LIGHT_USE_NEOPIXEL) #include "../../feature/caselight.h" #endif @@ -50,7 +50,7 @@ LEDLights leds; void LEDLights::setup() { - #if EITHER(RGB_LED, RGBW_LED) + #if ANY(RGB_LED, RGBW_LED) if (PWM_PIN(RGB_LED_R_PIN)) SET_PWM(RGB_LED_R_PIN); else SET_OUTPUT(RGB_LED_R_PIN); if (PWM_PIN(RGB_LED_G_PIN)) SET_PWM(RGB_LED_G_PIN); else SET_OUTPUT(RGB_LED_G_PIN); if (PWM_PIN(RGB_LED_B_PIN)) SET_PWM(RGB_LED_B_PIN); else SET_OUTPUT(RGB_LED_B_PIN); @@ -121,7 +121,7 @@ void LEDLights::set_color(const LEDColor &incol #endif #endif - #if BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL) + #if ALL(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL) // Update brightness only if caselight is ON or switching leds off if (caselight.on || incol.is_off()) #endif @@ -136,7 +136,7 @@ void LEDLights::set_color(const LEDColor &incol } #endif - #if BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL) + #if ALL(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL) // Update color only if caselight is ON or switching leds off if (caselight.on || incol.is_off()) #endif @@ -151,7 +151,7 @@ void LEDLights::set_color(const LEDColor &incol #endif - #if EITHER(RGB_LED, RGBW_LED) + #if ANY(RGB_LED, RGBW_LED) // This variant uses 3-4 separate pins for the RGB(W) components. // If the pins can do PWM then their intensity will be set. @@ -173,7 +173,7 @@ void LEDLights::set_color(const LEDColor &incol TERN_(PCA9632, PCA9632_set_led_color(incol)); TERN_(PCA9533, PCA9533_set_rgb(incol.r, incol.g, incol.b)); - #if EITHER(LED_CONTROL_MENU, PRINTER_EVENT_LEDS) + #if ANY(LED_CONTROL_MENU, PRINTER_EVENT_LEDS) // Don't update the color when OFF lights_on = !incol.is_off(); if (lights_on) color = incol; diff --git a/Marlin/src/feature/leds/leds.h b/Marlin/src/feature/leds/leds.h index c6137b45c355..7a31ca685d49 100644 --- a/Marlin/src/feature/leds/leds.h +++ b/Marlin/src/feature/leds/leds.h @@ -30,7 +30,7 @@ #include // A white component can be passed -#if EITHER(RGBW_LED, PCA9632_RGBW) +#if ANY(RGBW_LED, PCA9632_RGBW) #define HAS_WHITE_LED 1 #endif @@ -164,7 +164,7 @@ class LEDLights { #if ENABLED(LED_CONTROL_MENU) static void toggle(); // swap "off" with color #endif - #if EITHER(LED_CONTROL_MENU, CASE_LIGHT_USE_RGB_LED) || LED_POWEROFF_TIMEOUT > 0 + #if ANY(LED_CONTROL_MENU, CASE_LIGHT_USE_RGB_LED) || LED_POWEROFF_TIMEOUT > 0 static void update() { set_color(color); } #endif diff --git a/Marlin/src/feature/leds/neopixel.cpp b/Marlin/src/feature/leds/neopixel.cpp index ab7ffe217796..848c8500c27a 100644 --- a/Marlin/src/feature/leds/neopixel.cpp +++ b/Marlin/src/feature/leds/neopixel.cpp @@ -30,7 +30,7 @@ #include "leds.h" -#if EITHER(NEOPIXEL_STARTUP_TEST, NEOPIXEL2_STARTUP_TEST) +#if ANY(NEOPIXEL_STARTUP_TEST, NEOPIXEL2_STARTUP_TEST) #include "../../core/utility.h" #endif diff --git a/Marlin/src/feature/leds/neopixel.h b/Marlin/src/feature/leds/neopixel.h index 2048e2c2eebf..e0333d7f1ae1 100644 --- a/Marlin/src/feature/leds/neopixel.h +++ b/Marlin/src/feature/leds/neopixel.h @@ -58,7 +58,7 @@ #define MULTIPLE_NEOPIXEL_TYPES 1 #endif -#if EITHER(MULTIPLE_NEOPIXEL_TYPES, NEOPIXEL2_INSERIES) +#if ANY(MULTIPLE_NEOPIXEL_TYPES, NEOPIXEL2_INSERIES) #define CONJOINED_NEOPIXEL 1 #endif diff --git a/Marlin/src/feature/mixing.cpp b/Marlin/src/feature/mixing.cpp index cf88b806f542..7c9c54a314b8 100644 --- a/Marlin/src/feature/mixing.cpp +++ b/Marlin/src/feature/mixing.cpp @@ -42,7 +42,7 @@ int_fast8_t Mixer::runner = 0; mixer_comp_t Mixer::s_color[MIXING_STEPPERS]; mixer_accu_t Mixer::accu[MIXING_STEPPERS] = { 0 }; -#if EITHER(HAS_DUAL_MIXING, GRADIENT_MIX) +#if ANY(HAS_DUAL_MIXING, GRADIENT_MIX) mixer_perc_t Mixer::mix[MIXING_STEPPERS]; #endif @@ -138,7 +138,7 @@ void Mixer::init() { color[MIXER_AUTORETRACT_TOOL][i] = COLOR_A_MASK; #endif - #if EITHER(HAS_DUAL_MIXING, GRADIENT_MIX) + #if ANY(HAS_DUAL_MIXING, GRADIENT_MIX) update_mix_from_vtool(); #endif diff --git a/Marlin/src/feature/mixing.h b/Marlin/src/feature/mixing.h index 3a14fdad5975..a43b0599447a 100644 --- a/Marlin/src/feature/mixing.h +++ b/Marlin/src/feature/mixing.h @@ -122,7 +122,7 @@ class Mixer { MIXER_STEPPER_LOOP(i) s_color[i] = b_color[i]; } - #if EITHER(HAS_DUAL_MIXING, GRADIENT_MIX) + #if ANY(HAS_DUAL_MIXING, GRADIENT_MIX) static mixer_perc_t mix[MIXING_STEPPERS]; // Scratch array for the Mix in proportion to 100 diff --git a/Marlin/src/feature/mmu/mmu2.cpp b/Marlin/src/feature/mmu/mmu2.cpp index 7747a8b1157c..7a55f5e99e4d 100644 --- a/Marlin/src/feature/mmu/mmu2.cpp +++ b/Marlin/src/feature/mmu/mmu2.cpp @@ -140,7 +140,7 @@ uint8_t MMU2::get_current_tool() { return extruder == MMU2_NO_TOOL ? -1 : extruder; } -#if EITHER(HAS_PRUSA_MMU2S, MMU_EXTRUDER_SENSOR) +#if ANY(HAS_PRUSA_MMU2S, MMU_EXTRUDER_SENSOR) #define FILAMENT_PRESENT() (READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE) #endif diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 04d206ff931d..af60192edaa6 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -210,7 +210,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load while (wait_for_user) { impatient_beep(max_beep_count); - #if BOTH(FILAMENT_CHANGE_RESUME_ON_INSERT, FILAMENT_RUNOUT_SENSOR) + #if ALL(FILAMENT_CHANGE_RESUME_ON_INSERT, FILAMENT_RUNOUT_SENSOR) #if MULTI_FILAMENT_SENSOR #define _CASE_INSERTED(N) case N-1: if (READ(FIL_RUNOUT##N##_PIN) != FIL_RUNOUT##N##_STATE) wait_for_user = false; break; switch (active_extruder) { @@ -284,7 +284,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load // Show "Purge More" / "Resume" menu and wait for reply KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = false; - #if EITHER(HAS_MARLINUI_MENU, DWIN_LCD_PROUI) + #if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI) ui.pause_show_message(PAUSE_MESSAGE_OPTION); // Also sets PAUSE_RESPONSE_WAIT_FOR #else pause_menu_response = PAUSE_RESPONSE_WAIT_FOR; @@ -326,18 +326,18 @@ inline void disable_active_extruder() { */ bool unload_filament(const_float_t unload_length, const bool show_lcd/*=false*/, const PauseMode mode/*=PAUSE_MODE_PAUSE_PRINT*/ - #if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) + #if ALL(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) , const_float_t mix_multiplier/*=1.0*/ #endif ) { DEBUG_SECTION(uf, "unload_filament", true); DEBUG_ECHOLNPGM("... unloadlen:", unload_length, " showlcd:", show_lcd, " mode:", mode - #if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) + #if ALL(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) , " mixmult:", mix_multiplier #endif ); - #if !BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) + #if !ALL(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) constexpr float mix_multiplier = 1.0f; #endif diff --git a/Marlin/src/feature/pause.h b/Marlin/src/feature/pause.h index 134b1d1b3294..7ea0c03b6bbb 100644 --- a/Marlin/src/feature/pause.h +++ b/Marlin/src/feature/pause.h @@ -117,7 +117,7 @@ bool unload_filament( const_float_t unload_length, // (mm) Filament Unload Length - 0 to skip const bool show_lcd=false, // Set LCD status messages? const PauseMode mode=PAUSE_MODE_PAUSE_PRINT // Pause Mode to apply - #if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) + #if ALL(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) , const_float_t mix_multiplier=1.0f // Extrusion multiplier (for a Mixing Extruder) #endif ); diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index 8a16628bac45..d0f8a66fec36 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -26,7 +26,7 @@ #include "../inc/MarlinConfigPre.h" -#if EITHER(PSU_CONTROL, AUTO_POWER_CONTROL) +#if ANY(PSU_CONTROL, AUTO_POWER_CONTROL) #include "power.h" #include "../module/planner.h" @@ -49,7 +49,7 @@ bool Power::psu_on; #include "../module/stepper.h" #include "../module/temperature.h" - #if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN) + #if ALL(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN) #include "controllerfan.h" #endif @@ -78,7 +78,7 @@ void Power::power_on() { if (psu_on) return; - #if EITHER(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN) + #if ANY(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN) cancelAutoPowerOff(); #endif @@ -115,12 +115,12 @@ void Power::power_off() { OUT_WRITE(PS_ON_PIN, !PSU_ACTIVE_STATE); psu_on = false; - #if EITHER(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN) + #if ANY(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN) cancelAutoPowerOff(); #endif } -#if EITHER(AUTO_POWER_CONTROL, POWER_OFF_WAIT_FOR_COOLDOWN) +#if ANY(AUTO_POWER_CONTROL, POWER_OFF_WAIT_FOR_COOLDOWN) bool Power::is_cooling_needed() { #if HAS_HOTEND && AUTO_POWER_E_TEMP @@ -140,7 +140,7 @@ void Power::power_off() { #endif -#if EITHER(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN) +#if ANY(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN) #if ENABLED(POWER_OFF_TIMER) millis_t Power::power_off_time = 0; @@ -192,7 +192,7 @@ void Power::power_off() { HOTEND_LOOP() if (thermalManager.autofan_speed[e]) return true; #endif - #if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN) + #if ALL(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN) if (controllerFan.state()) return true; #endif diff --git a/Marlin/src/feature/power.h b/Marlin/src/feature/power.h index 839366ca602b..fdbb7126ceae 100644 --- a/Marlin/src/feature/power.h +++ b/Marlin/src/feature/power.h @@ -25,7 +25,7 @@ * power.h - power control */ -#if EITHER(AUTO_POWER_CONTROL, POWER_OFF_TIMER) +#if ANY(AUTO_POWER_CONTROL, POWER_OFF_TIMER) #include "../core/millis_t.h" #endif @@ -37,7 +37,7 @@ class Power { static void power_on(); static void power_off(); - #if EITHER(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN) + #if ANY(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN) #if ENABLED(POWER_OFF_TIMER) static millis_t power_off_time; static void setPowerOffTimer(const millis_t delay_ms); diff --git a/Marlin/src/feature/powerloss.cpp b/Marlin/src/feature/powerloss.cpp index 1037f823f644..81dfa90433bf 100644 --- a/Marlin/src/feature/powerloss.cpp +++ b/Marlin/src/feature/powerloss.cpp @@ -691,7 +691,7 @@ void PrintJobRecovery::resume() { #endif // Mixing extruder and gradient - #if BOTH(MIXING_EXTRUDER, GRADIENT_MIX) + #if ALL(MIXING_EXTRUDER, GRADIENT_MIX) DEBUG_ECHOLNPGM("gradient: ", info.gradient.enabled ? "ON" : "OFF"); #endif diff --git a/Marlin/src/feature/solenoid.cpp b/Marlin/src/feature/solenoid.cpp index 861e44ed05de..46364eaf8f5b 100644 --- a/Marlin/src/feature/solenoid.cpp +++ b/Marlin/src/feature/solenoid.cpp @@ -22,7 +22,7 @@ #include "../inc/MarlinConfig.h" -#if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL) +#if ANY(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL) #include "solenoid.h" diff --git a/Marlin/src/gcode/bedlevel/G35.cpp b/Marlin/src/gcode/bedlevel/G35.cpp index dd828bf0c873..e91fabf5fc18 100644 --- a/Marlin/src/gcode/bedlevel/G35.cpp +++ b/Marlin/src/gcode/bedlevel/G35.cpp @@ -158,7 +158,7 @@ void GcodeSuite::G35() { if (old_tool_index != 0) tool_change(old_tool_index, DISABLED(PARKING_EXTRUDER)); // Fetch previous toolhead if not PARKING_EXTRUDER #endif - #if BOTH(HAS_LEVELING, RESTORE_LEVELING_AFTER_G35) + #if ALL(HAS_LEVELING, RESTORE_LEVELING_AFTER_G35) set_bed_leveling_enabled(leveling_was_active); #endif diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 79f92f7482a2..1102f6013a9f 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -101,7 +101,7 @@ class G29_State { uint8_t tool_index; #endif - #if EITHER(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR) + #if ANY(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR) int abl_probe_index; #endif @@ -143,7 +143,7 @@ class G29_State { #endif }; -#if ABL_USES_GRID && EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_BILINEAR) +#if ABL_USES_GRID && ANY(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_BILINEAR) constexpr xy_uint8_t G29_State::grid_points; constexpr int G29_State::abl_points; #endif @@ -235,7 +235,7 @@ G29_TYPE GcodeSuite::G29() { reset_stepper_timeout(); // Q = Query leveling and G29 state - const bool seenQ = EITHER(DEBUG_LEVELING_FEATURE, PROBE_MANUALLY) && parser.seen_test('Q'); + const bool seenQ = ANY(DEBUG_LEVELING_FEATURE, PROBE_MANUALLY) && parser.seen_test('Q'); // G29 Q is also available if debugging #if ENABLED(DEBUG_LEVELING_FEATURE) @@ -286,7 +286,7 @@ G29_TYPE GcodeSuite::G29() { if (active_extruder != 0) tool_change(0, true); #endif - #if EITHER(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR) + #if ANY(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR) abl.abl_probe_index = -1; #endif @@ -443,7 +443,7 @@ G29_TYPE GcodeSuite::G29() { #if ENABLED(PREHEAT_BEFORE_LEVELING) if (!abl.dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP, - #if BOTH(DWIN_LCD_PROUI, HAS_HEATED_BED) + #if ALL(DWIN_LCD_PROUI, HAS_HEATED_BED) HMI_data.BedLevT #else LEVELING_BED_TEMP @@ -556,7 +556,7 @@ G29_TYPE GcodeSuite::G29() { } else { - #if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) + #if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) const uint16_t index = abl.abl_probe_index - 1; #endif diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index a9f378adfc90..6aa1f5e7fd41 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -468,7 +468,7 @@ void GcodeSuite::G28() { #endif } - #if BOTH(FOAMCUTTER_XYUV, HAS_I_AXIS) + #if ALL(FOAMCUTTER_XYUV, HAS_I_AXIS) // Home I (after X) if (doI) homeaxis(I_AXIS); #endif @@ -479,7 +479,7 @@ void GcodeSuite::G28() { homeaxis(Y_AXIS); #endif - #if BOTH(FOAMCUTTER_XYUV, HAS_J_AXIS) + #if ALL(FOAMCUTTER_XYUV, HAS_J_AXIS) // Home J (after Y) if (doJ) homeaxis(J_AXIS); #endif @@ -493,7 +493,7 @@ void GcodeSuite::G28() { // Home Z last if homing towards the bed #if HAS_Z_AXIS && DISABLED(HOME_Z_FIRST) if (doZ) { - #if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) + #if ANY(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) stepper.set_all_z_lock(false); stepper.set_separate_multi_axis(false); #endif diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index 8cf652cd8411..4572a0faa682 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfigPre.h" -#if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) +#if ANY(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) #include "../../feature/z_stepper_align.h" @@ -451,7 +451,7 @@ void GcodeSuite::G34() { // Restore the active tool after homing TERN_(HAS_MULTI_HOTEND, tool_change(old_tool_index, DISABLED(PARKING_EXTRUDER))); // Fetch previous tool for parking extruder - #if BOTH(HAS_LEVELING, RESTORE_LEVELING_AFTER_G34) + #if ALL(HAS_LEVELING, RESTORE_LEVELING_AFTER_G34) set_bed_leveling_enabled(leveling_was_active); #endif diff --git a/Marlin/src/gcode/calibrate/G425.cpp b/Marlin/src/gcode/calibrate/G425.cpp index a22608f5b42b..76b57f6dea6f 100644 --- a/Marlin/src/gcode/calibrate/G425.cpp +++ b/Marlin/src/gcode/calibrate/G425.cpp @@ -70,7 +70,7 @@ #define CALIBRATION_MEASUREMENT_CERTAIN 0.5 // mm #endif -#if BOTH(CALIBRATION_MEASURE_LEFT, CALIBRATION_MEASURE_RIGHT) +#if ALL(CALIBRATION_MEASURE_LEFT, CALIBRATION_MEASURE_RIGHT) #define HAS_X_CENTER 1 #endif #if ALL(HAS_Y_AXIS, CALIBRATION_MEASURE_FRONT, CALIBRATION_MEASURE_BACK) diff --git a/Marlin/src/gcode/calibrate/G76_M871.cpp b/Marlin/src/gcode/calibrate/G76_M871.cpp index c484d4f1b770..003a1cd69d0d 100644 --- a/Marlin/src/gcode/calibrate/G76_M871.cpp +++ b/Marlin/src/gcode/calibrate/G76_M871.cpp @@ -82,7 +82,7 @@ * - `P` - Run probe temperature calibration. */ -#if BOTH(PTC_PROBE, PTC_BED) +#if ALL(PTC_PROBE, PTC_BED) static void say_waiting_for() { SERIAL_ECHOPGM("Waiting for "); } static void say_waiting_for_probe_heating() { say_waiting_for(); SERIAL_ECHOLNPGM("probe heating."); } diff --git a/Marlin/src/gcode/calibrate/M100.cpp b/Marlin/src/gcode/calibrate/M100.cpp index 338392b59746..9141d360e1b9 100644 --- a/Marlin/src/gcode/calibrate/M100.cpp +++ b/Marlin/src/gcode/calibrate/M100.cpp @@ -60,7 +60,7 @@ #define TEST_BYTE ((char) 0xE5) -#if EITHER(__AVR__, IS_32BIT_TEENSY) +#if ANY(__AVR__, IS_32BIT_TEENSY) extern char __bss_end; char *end_bss = &__bss_end, diff --git a/Marlin/src/gcode/control/M380_M381.cpp b/Marlin/src/gcode/control/M380_M381.cpp index 6bcec891e281..20d24484ed0f 100644 --- a/Marlin/src/gcode/control/M380_M381.cpp +++ b/Marlin/src/gcode/control/M380_M381.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL) +#if ANY(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL) #include "../gcode.h" #include "../../feature/solenoid.h" diff --git a/Marlin/src/gcode/control/M7-M9.cpp b/Marlin/src/gcode/control/M7-M9.cpp index ccde4f552cb9..837bb114b299 100644 --- a/Marlin/src/gcode/control/M7-M9.cpp +++ b/Marlin/src/gcode/control/M7-M9.cpp @@ -37,7 +37,7 @@ } #endif -#if EITHER(COOLANT_FLOOD, AIR_ASSIST) +#if ANY(COOLANT_FLOOD, AIR_ASSIST) #if ENABLED(AIR_ASSIST) #include "../../feature/spindle_laser.h" diff --git a/Marlin/src/gcode/control/M80_M81.cpp b/Marlin/src/gcode/control/M80_M81.cpp index 90b25e7ed34d..94dd5e3dd93f 100644 --- a/Marlin/src/gcode/control/M80_M81.cpp +++ b/Marlin/src/gcode/control/M80_M81.cpp @@ -79,7 +79,7 @@ void GcodeSuite::M81() { print_job_timer.stop(); - #if BOTH(HAS_FAN, PROBING_FANS_OFF) + #if ALL(HAS_FAN, PROBING_FANS_OFF) thermalManager.fans_paused = false; ZERO(thermalManager.saved_fan_speed); #endif diff --git a/Marlin/src/gcode/control/T.cpp b/Marlin/src/gcode/control/T.cpp index 5e8f6b5436d4..5e1579ec123a 100644 --- a/Marlin/src/gcode/control/T.cpp +++ b/Marlin/src/gcode/control/T.cpp @@ -23,7 +23,7 @@ #include "../gcode.h" #include "../../module/tool_change.h" -#if EITHER(HAS_MULTI_EXTRUDER, DEBUG_LEVELING_FEATURE) +#if ANY(HAS_MULTI_EXTRUDER, DEBUG_LEVELING_FEATURE) #include "../../module/motion.h" #endif diff --git a/Marlin/src/gcode/feature/pause/M125.cpp b/Marlin/src/gcode/feature/pause/M125.cpp index 9b18eda4fbae..f17eac3ed27d 100644 --- a/Marlin/src/gcode/feature/pause/M125.cpp +++ b/Marlin/src/gcode/feature/pause/M125.cpp @@ -96,7 +96,7 @@ void GcodeSuite::M125() { const bool show_lcd = TERN0(HAS_MARLINUI_MENU, parser.boolval('P')); if (pause_print(retract, park_point, show_lcd, 0)) { - if (ENABLED(EXTENSIBLE_UI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) || !sd_printing || show_lcd) { + if (ENABLED(EXTENSIBLE_UI) || ALL(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) || !sd_printing || show_lcd) { wait_for_confirmation(false, 0); resume_print(0, 0, -retract, 0); } diff --git a/Marlin/src/gcode/feature/pause/M701_M702.cpp b/Marlin/src/gcode/feature/pause/M701_M702.cpp index 2afc5c36a09b..d1ebf254c16a 100644 --- a/Marlin/src/gcode/feature/pause/M701_M702.cpp +++ b/Marlin/src/gcode/feature/pause/M701_M702.cpp @@ -199,7 +199,7 @@ void GcodeSuite::M702() { #if HAS_PRUSA_MMU2 mmu2.unload(); #else - #if BOTH(HAS_MULTI_EXTRUDER, FILAMENT_UNLOAD_ALL_EXTRUDERS) + #if ALL(HAS_MULTI_EXTRUDER, FILAMENT_UNLOAD_ALL_EXTRUDERS) if (!parser.seenval('T')) { HOTEND_LOOP() { if (e != active_extruder) tool_change(e); diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index bb859d802641..3f677442a57e 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -94,7 +94,7 @@ axis_bits_t GcodeSuite::axis_relative = 0 LOGICAL_AXIS_GANG( | (ar_init.w << REL_W) ); -#if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE) +#if ANY(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE) bool GcodeSuite::autoreport_paused; // = false #endif @@ -216,13 +216,13 @@ void GcodeSuite::get_destination_from_command() { TERN_(LASER_FEATURE, cutter.feedrate_mm_m = MMS_TO_MMM(feedrate_mm_s)); } - #if BOTH(PRINTCOUNTER, HAS_EXTRUDERS) + #if ALL(PRINTCOUNTER, HAS_EXTRUDERS) if (!DEBUGGING(DRYRUN) && !skip_move) print_job_timer.incFilamentUsed(destination.e - current_position.e); #endif // Get ABCDHI mixing factors - #if BOTH(MIXING_EXTRUDER, DIRECT_MIXING_IN_G1) + #if ALL(MIXING_EXTRUDER, DIRECT_MIXING_IN_G1) M165(); #endif @@ -454,7 +454,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 61: G61(); break; // G61: Apply/restore saved coordinates. #endif - #if BOTH(PTC_PROBE, PTC_BED) + #if ALL(PTC_PROBE, PTC_BED) case 76: G76(); break; // G76: Calibrate first layer compensation values #endif @@ -496,11 +496,11 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 7: M7(); break; // M7: Coolant Mist ON #endif - #if EITHER(AIR_ASSIST, COOLANT_FLOOD) + #if ANY(AIR_ASSIST, COOLANT_FLOOD) case 8: M8(); break; // M8: Air Assist / Coolant Flood ON #endif - #if EITHER(AIR_ASSIST, COOLANT_CONTROL) + #if ANY(AIR_ASSIST, COOLANT_CONTROL) case 9: M9(); break; // M9: Air Assist / Coolant OFF #endif @@ -540,7 +540,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 33: M33(); break; // M33: Get the long full path to a file or folder #endif - #if BOTH(SDCARD_SORT_ALPHA, SDSORT_GCODE) + #if ALL(SDCARD_SORT_ALPHA, SDSORT_GCODE) case 34: M34(); break; // M34: Set SD card sorting options #endif @@ -640,7 +640,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 154: M154(); break; // M154: Set position auto-report interval #endif - #if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR) + #if ALL(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR) case 155: M155(); break; // M155: Set temperature auto-report interval #endif @@ -836,7 +836,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 364: if (M364()) return; break; // M364: SCARA Psi pos3 (90 deg to Theta) #endif - #if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL) + #if ANY(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL) case 380: M380(); break; // M380: Activate solenoid on active (or specified) extruder case 381: M381(); break; // M381: Disable all solenoids or, if MANUAL_SOLENOID_CONTROL, active (or specified) solenoid #endif @@ -991,7 +991,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { #if ANY(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_PWM, HAS_MOTOR_CURRENT_I2C, HAS_MOTOR_CURRENT_DAC) case 907: M907(); break; // M907: Set digital trimpot motor current using axis codes. - #if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC) + #if ANY(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC) case 908: M908(); break; // M908: Control digital trimpot directly. #if HAS_MOTOR_CURRENT_DAC case 909: M909(); break; // M909: Print digipot/DAC current value diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 5d56e53dd5e0..ae9b7ed69e4c 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -435,7 +435,7 @@ class GcodeSuite { process_subcommands_now(keep_leveling ? FPSTR(G28_STR) : TERN(CAN_SET_LEVELING_AFTER_G28, F("G28L0"), FPSTR(G28_STR))); } - #if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE) + #if ANY(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE) static bool autoreport_paused; static bool set_autoreport_paused(const bool p) { const bool was = autoreport_paused; @@ -582,7 +582,7 @@ class GcodeSuite { static void G59(); #endif - #if BOTH(PTC_PROBE, PTC_BED) + #if ALL(PTC_PROBE, PTC_BED) static void G76(); #endif @@ -614,11 +614,11 @@ class GcodeSuite { static void M7(); #endif - #if EITHER(AIR_ASSIST, COOLANT_FLOOD) + #if ANY(AIR_ASSIST, COOLANT_FLOOD) static void M8(); #endif - #if EITHER(AIR_ASSIST, COOLANT_CONTROL) + #if ANY(AIR_ASSIST, COOLANT_CONTROL) static void M9(); #endif @@ -662,7 +662,7 @@ class GcodeSuite { #if ENABLED(LONG_FILENAME_HOST_SUPPORT) static void M33(); #endif - #if BOTH(SDCARD_SORT_ALPHA, SDSORT_GCODE) + #if ALL(SDCARD_SORT_ALPHA, SDSORT_GCODE) static void M34(); #endif #endif @@ -811,7 +811,7 @@ class GcodeSuite { static void M154(); #endif - #if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR) + #if ALL(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR) static void M155(); #endif @@ -979,7 +979,7 @@ class GcodeSuite { static bool M364(); #endif - #if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL) + #if ANY(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL) static void M380(); static void M381(); #endif @@ -1101,7 +1101,7 @@ class GcodeSuite { static void M665_report(const bool forReplay=true); #endif - #if EITHER(DELTA, HAS_EXTRA_ENDSTOPS) + #if ANY(DELTA, HAS_EXTRA_ENDSTOPS) static void M666(); static void M666_report(const bool forReplay=true); #endif @@ -1200,7 +1200,7 @@ class GcodeSuite { static void M995(); #endif - #if BOTH(SPI_FLASH, SDSUPPORT) + #if ALL(SPI_FLASH, SDSUPPORT) static void M993(); static void M994(); #endif diff --git a/Marlin/src/gcode/motion/G0_G1.cpp b/Marlin/src/gcode/motion/G0_G1.cpp index cee2f050807e..adbc6e5c0bfa 100644 --- a/Marlin/src/gcode/motion/G0_G1.cpp +++ b/Marlin/src/gcode/motion/G0_G1.cpp @@ -25,7 +25,7 @@ #include "../../MarlinCore.h" -#if BOTH(FWRETRACT, FWRETRACT_AUTORETRACT) +#if ALL(FWRETRACT, FWRETRACT_AUTORETRACT) #include "../../feature/fwretract.h" #endif @@ -87,7 +87,7 @@ void GcodeSuite::G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move/*=false*/)) { } #endif - #if BOTH(FWRETRACT, FWRETRACT_AUTORETRACT) + #if ALL(FWRETRACT, FWRETRACT_AUTORETRACT) if (MIN_AUTORETRACT <= MAX_AUTORETRACT) { // When M209 Autoretract is enabled, convert E-only moves to firmware retract/recover moves diff --git a/Marlin/src/gcode/parser.cpp b/Marlin/src/gcode/parser.cpp index 3fc1fc1625ad..90586e371f50 100644 --- a/Marlin/src/gcode/parser.cpp +++ b/Marlin/src/gcode/parser.cpp @@ -233,7 +233,7 @@ void GCodeParser::parse(char *p) { #if ENABLED(GCODE_MOTION_MODES) - #if EITHER(BEZIER_CURVE_SUPPORT, ARC_SUPPORT) + #if ANY(BEZIER_CURVE_SUPPORT, ARC_SUPPORT) case 'I' ... 'J': case 'P': if (TERN1(BEZIER_CURVE_SUPPORT, motion_mode_codenum != 5) && TERN1(ARC_P_CIRCLES, !WITHIN(motion_mode_codenum, 2, 3)) diff --git a/Marlin/src/gcode/probe/G30.cpp b/Marlin/src/gcode/probe/G30.cpp index 42a081960d08..fb62f93b6ef2 100644 --- a/Marlin/src/gcode/probe/G30.cpp +++ b/Marlin/src/gcode/probe/G30.cpp @@ -76,7 +76,7 @@ void GcodeSuite::G30() { TERN_(HAS_PTC, ptc.set_enabled(true)); if (!isnan(measured_z)) { SERIAL_ECHOLNPGM("Bed X: ", pos.asLogical().x, " Y: ", pos.asLogical().y, " Z: ", measured_z); - #if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI) + #if ANY(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI) char msg[31], str_1[6], str_2[6], str_3[6]; sprintf_P(msg, PSTR("X:%s, Y:%s, Z:%s"), dtostrf(pos.x, 1, 1, str_1), diff --git a/Marlin/src/gcode/sd/M1001.cpp b/Marlin/src/gcode/sd/M1001.cpp index 1d1d1a4b7f80..61b096fefd8d 100644 --- a/Marlin/src/gcode/sd/M1001.cpp +++ b/Marlin/src/gcode/sd/M1001.cpp @@ -34,7 +34,7 @@ #include "../queue.h" #endif -#if EITHER(SET_PROGRESS_MANUALLY, SD_REPRINT_LAST_SELECTED_FILE) +#if ANY(SET_PROGRESS_MANUALLY, SD_REPRINT_LAST_SELECTED_FILE) #include "../../lcd/marlinui.h" #endif diff --git a/Marlin/src/gcode/sd/M34.cpp b/Marlin/src/gcode/sd/M34.cpp index 2dd7dc580c93..0a7d4d8c6221 100644 --- a/Marlin/src/gcode/sd/M34.cpp +++ b/Marlin/src/gcode/sd/M34.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if BOTH(SDCARD_SORT_ALPHA, SDSORT_GCODE) +#if ALL(SDCARD_SORT_ALPHA, SDSORT_GCODE) #include "../gcode.h" #include "../../sd/cardreader.h" diff --git a/Marlin/src/gcode/temp/M155.cpp b/Marlin/src/gcode/temp/M155.cpp index 48c23986aeb5..4166cd52cacd 100644 --- a/Marlin/src/gcode/temp/M155.cpp +++ b/Marlin/src/gcode/temp/M155.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR) +#if ALL(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR) #include "../gcode.h" #include "../../module/temperature.h" diff --git a/Marlin/src/gcode/temp/M303.cpp b/Marlin/src/gcode/temp/M303.cpp index 820b1556d611..99f93885833d 100644 --- a/Marlin/src/gcode/temp/M303.cpp +++ b/Marlin/src/gcode/temp/M303.cpp @@ -78,7 +78,7 @@ void GcodeSuite::M303() { const celsius_t temp = seenS ? parser.value_celsius() : default_temp; const bool u = parser.boolval('U'); - #if ENABLED(DWIN_LCD_PROUI) && EITHER(PIDTEMP, PIDTEMPBED) + #if ENABLED(DWIN_LCD_PROUI) && ANY(PIDTEMP, PIDTEMPBED) if (seenC) HMI_data.PidCycles = c; if (seenS) { switch (hid) { diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index eee877be80fd..0b058c01a16b 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -27,12 +27,12 @@ */ // MKS_LCD12864A/B is a variant of MKS_MINI_12864 -#if EITHER(MKS_LCD12864A, MKS_LCD12864B) +#if ANY(MKS_LCD12864A, MKS_LCD12864B) #define MKS_MINI_12864 #endif // MKS_MINI_12864_V3 and BTT_MINI_12864_V1 are identical to FYSETC_MINI_12864_2_1 -#if EITHER(MKS_MINI_12864_V3, BTT_MINI_12864_V1) +#if ANY(MKS_MINI_12864_V3, BTT_MINI_12864_V1) #define FYSETC_MINI_12864_2_1 #endif @@ -51,7 +51,7 @@ * IS_U8GLIB_ST7565_64128N : ST7565 128x64 LCD with SPI interface via U8GLib * IS_U8GLIB_LM6059_AF : LM6059 with Hardware SPI via U8GLib */ -#if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) +#if ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define MINIPANEL @@ -64,7 +64,7 @@ #define DOGLCD #define IS_ULTIPANEL 1 -#elif EITHER(DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) +#elif ANY(DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) #define IS_DWIN_MARLINUI 1 #define IS_ULTIPANEL 1 @@ -197,7 +197,7 @@ #define LCD_WIDTH 16 #define LCD_HEIGHT 2 -#elif EITHER(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C) +#elif ANY(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C) #define IS_TFTGLCD_PANEL 1 #define IS_ULTIPANEL 1 // Note that IS_ULTIPANEL leads to HAS_WIRED_LCD @@ -227,7 +227,7 @@ #define LCD_ST7920_DELAY_2 125 #define LCD_ST7920_DELAY_3 125 -#elif EITHER(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING) +#elif ANY(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING) #define IS_RRD_FG_SC 1 #define LCD_ST7920_DELAY_1 150 @@ -257,7 +257,7 @@ #endif // ST7565 / 64128N graphical displays -#if EITHER(MAKRPANEL, MINIPANEL) +#if ANY(MAKRPANEL, MINIPANEL) #define IS_ULTIPANEL 1 #define DOGLCD #if ENABLED(MAKRPANEL) @@ -321,11 +321,11 @@ #define TFT_INTERFACE_SPI #endif -#if EITHER(FSMC_GRAPHICAL_TFT, SPI_GRAPHICAL_TFT) +#if ANY(FSMC_GRAPHICAL_TFT, SPI_GRAPHICAL_TFT) #define TFT_CLASSIC_UI #elif ANY(TFT_320x240, TFT_480x320, TFT_320x240_SPI, TFT_480x320_SPI) #define TFT_COLOR_UI -#elif EITHER(TFT_LVGL_UI_FSMC, TFT_LVGL_UI_SPI) +#elif ANY(TFT_LVGL_UI_FSMC, TFT_LVGL_UI_SPI) #define TFT_LVGL_UI #endif @@ -370,7 +370,7 @@ #define IS_ULTIPANEL 1 #endif -#elif EITHER(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) +#elif ANY(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) #define LCD_I2C_TYPE_PCF8575 // I2C Character-based 12864 display #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander @@ -408,7 +408,7 @@ #endif -#if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && DISABLED(NO_LCD_DETECT) +#if ANY(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && DISABLED(NO_LCD_DETECT) #define DETECT_I2C_LCD_DEVICE 1 #endif @@ -446,15 +446,15 @@ #define IS_ULTIPANEL 1 #endif -#if EITHER(IS_ULTIPANEL, ULTRA_LCD) +#if ANY(IS_ULTIPANEL, ULTRA_LCD) #define HAS_WIRED_LCD 1 #endif -#if EITHER(IS_ULTIPANEL, REPRAPWORLD_KEYPAD) +#if ANY(IS_ULTIPANEL, REPRAPWORLD_KEYPAD) #define IS_NEWPANEL 1 #endif -#if EITHER(ZONESTAR_LCD, REPRAPWORLD_KEYPAD) +#if ANY(ZONESTAR_LCD, REPRAPWORLD_KEYPAD) #define IS_RRW_KEYPAD 1 #ifndef REPRAPWORLD_KEYPAD_MOVE_STEP #define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 @@ -466,7 +466,7 @@ #define HAS_DGUS_LCD_CLASSIC 1 #endif -#if EITHER(HAS_DGUS_LCD_CLASSIC, DGUS_LCD_UI_RELOADED) +#if ANY(HAS_DGUS_LCD_CLASSIC, DGUS_LCD_UI_RELOADED) #define HAS_DGUS_LCD 1 #endif @@ -477,10 +477,10 @@ #endif // Aliases for LCD features -#if EITHER(DWIN_CREALITY_LCD, DWIN_LCD_PROUI) +#if ANY(DWIN_CREALITY_LCD, DWIN_LCD_PROUI) #define HAS_DWIN_E3V2_BASIC 1 #endif -#if EITHER(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI) +#if ANY(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI) #define HAS_DWIN_E3V2 1 #endif #if ENABLED(DWIN_LCD_PROUI) @@ -663,7 +663,7 @@ #define SINGLENOZZLE #endif -#if EITHER(SINGLENOZZLE, MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset +#if ANY(SINGLENOZZLE, MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset #undef HOTENDS #define HOTENDS 1 #undef HOTEND_OFFSET_X @@ -1042,7 +1042,7 @@ #if DISABLED(SINGLENOZZLE) #undef SINGLENOZZLE_STANDBY_TEMP #endif -#if !BOTH(HAS_FAN, SINGLENOZZLE) +#if !ALL(HAS_FAN, SINGLENOZZLE) #undef SINGLENOZZLE_STANDBY_FAN #endif @@ -1248,7 +1248,7 @@ #if DISABLED(NOZZLE_AS_PROBE) #define HAS_PROBE_XY_OFFSET 1 #endif - #if BOTH(DELTA, SENSORLESS_PROBING) + #if ALL(DELTA, SENSORLESS_PROBING) #define HAS_DELTA_SENSORLESS_PROBING 1 #endif #if NONE(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, HAS_DELTA_SENSORLESS_PROBING) @@ -1260,7 +1260,7 @@ #ifndef Z_PROBE_LOW_POINT #define Z_PROBE_LOW_POINT -5 #endif - #if EITHER(Z_PROBE_ALLEN_KEY, MAG_MOUNTED_PROBE) + #if ANY(Z_PROBE_ALLEN_KEY, MAG_MOUNTED_PROBE) #define PROBE_TRIGGERED_WHEN_STOWED_TEST 1 // Extra test for Allen Key Probe #endif #if MULTIPLE_PROBING > 1 @@ -1290,14 +1290,14 @@ */ #if ENABLED(AUTO_BED_LEVELING_UBL) #undef LCD_BED_LEVELING - #if EITHER(DELTA, SEGMENT_LEVELED_MOVES) + #if ANY(DELTA, SEGMENT_LEVELED_MOVES) #define UBL_SEGMENTED 1 #endif #endif -#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) +#if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) #define ABL_PLANAR 1 #endif -#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) +#if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) #define ABL_USES_GRID 1 #endif #if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_3POINT) @@ -1306,16 +1306,16 @@ #if ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL, MESH_BED_LEVELING) #define HAS_MESH 1 #endif -#if EITHER(AUTO_BED_LEVELING_UBL, AUTO_BED_LEVELING_3POINT) +#if ANY(AUTO_BED_LEVELING_UBL, AUTO_BED_LEVELING_3POINT) #define NEEDS_THREE_PROBE_POINTS 1 #endif -#if EITHER(HAS_ABL_NOT_UBL, AUTO_BED_LEVELING_UBL) +#if ANY(HAS_ABL_NOT_UBL, AUTO_BED_LEVELING_UBL) #define HAS_ABL_OR_UBL 1 #if DISABLED(PROBE_MANUALLY) #define HAS_AUTOLEVEL 1 #endif #endif -#if EITHER(HAS_ABL_OR_UBL, MESH_BED_LEVELING) +#if ANY(HAS_ABL_OR_UBL, MESH_BED_LEVELING) #define HAS_LEVELING 1 #if DISABLED(AUTO_BED_LEVELING_UBL) #define PLANNER_LEVELING 1 @@ -1326,7 +1326,7 @@ #undef ENABLE_LEVELING_AFTER_G28 #undef G29_RETRY_AND_RECOVER #endif -#if !HAS_LEVELING || EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) +#if !HAS_LEVELING || ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) #undef PROBE_MANUALLY #endif #if ANY(HAS_BED_PROBE, PROBE_MANUALLY, MESH_BED_LEVELING) @@ -1346,13 +1346,13 @@ /** * CoreXY, CoreXZ, and CoreYZ - and their reverse */ -#if EITHER(COREXY, COREYX) +#if ANY(COREXY, COREYX) #define CORE_IS_XY 1 #endif -#if EITHER(COREXZ, COREZX) +#if ANY(COREXZ, COREZX) #define CORE_IS_XZ 1 #endif -#if EITHER(COREYZ, COREZY) +#if ANY(COREYZ, COREZY) #define CORE_IS_YZ 1 #endif #if CORE_IS_XY || CORE_IS_XZ || CORE_IS_YZ @@ -1373,7 +1373,7 @@ #define CORE_AXIS_2 C_AXIS #endif #define CORESIGN(n) (ANY(COREYX, COREZX, COREZY) ? (-(n)) : (n)) -#elif EITHER(MARKFORGED_XY, MARKFORGED_YX) +#elif ANY(MARKFORGED_XY, MARKFORGED_YX) // Markforged kinematics #define CORE_AXIS_1 A_AXIS #define CORE_AXIS_2 B_AXIS @@ -1383,7 +1383,7 @@ #if ANY(MORGAN_SCARA, MP_SCARA, AXEL_TPARA) #define IS_SCARA 1 #define IS_KINEMATIC 1 -#elif EITHER(DELTA, POLARGRAPH) +#elif ANY(DELTA, POLARGRAPH) #define IS_KINEMATIC 1 #else #define IS_CARTESIAN 1 @@ -1397,7 +1397,7 @@ #endif // This flag indicates some kind of jerk storage is needed -#if EITHER(CLASSIC_JERK, IS_KINEMATIC) +#if ANY(CLASSIC_JERK, IS_KINEMATIC) #define HAS_CLASSIC_JERK 1 #endif @@ -1457,12 +1457,12 @@ * - TFT_COLOR * - GRAPHICAL_TFT_UPSCALE */ -#if EITHER(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0) // ST7796 +#if ANY(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0) // ST7796 #define TFT_DEFAULT_DRIVER ST7796 #define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY #define TFT_RES_480x320 #define TFT_INTERFACE_SPI -#elif EITHER(LERDGE_TFT35, ANET_ET5_TFT35) // ST7796 +#elif ANY(LERDGE_TFT35, ANET_ET5_TFT35) // ST7796 #define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY #define TFT_RES_480x320 #define TFT_INTERFACE_FSMC @@ -1480,7 +1480,7 @@ #define TFT_DEFAULT_ORIENTATION 0 #define TFT_RES_480x272 #define TFT_INTERFACE_FSMC -#elif EITHER(MKS_ROBIN_TFT_V1_1R, LONGER_LK_TFT28) // ILI9328 or R61505 +#elif ANY(MKS_ROBIN_TFT_V1_1R, LONGER_LK_TFT28) // ILI9328 or R61505 #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y) #define TFT_RES_320x240 #define TFT_INTERFACE_FSMC @@ -1577,13 +1577,13 @@ #endif #endif -#if EITHER(TFT_320x240, TFT_320x240_SPI) +#if ANY(TFT_320x240, TFT_320x240_SPI) #define HAS_UI_320x240 1 -#elif EITHER(TFT_480x320, TFT_480x320_SPI) +#elif ANY(TFT_480x320, TFT_480x320_SPI) #define HAS_UI_480x320 1 -#elif EITHER(TFT_480x272, TFT_480x272_SPI) +#elif ANY(TFT_480x272, TFT_480x272_SPI) #define HAS_UI_480x272 1 -#elif EITHER(TFT_1024x600_LTDC, TFT_1024x600_SIM) +#elif ANY(TFT_1024x600_LTDC, TFT_1024x600_SIM) #define HAS_UI_1024x600 1 #endif #if ANY(HAS_UI_320x240, HAS_UI_480x320, HAS_UI_480x272) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index faf882389179..c41bf7161f00 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -660,11 +660,11 @@ #endif #endif -#if ENABLED(MIXING_EXTRUDER) && (ENABLED(RETRACT_SYNC_MIXING) || BOTH(FILAMENT_LOAD_UNLOAD_GCODES, FILAMENT_UNLOAD_ALL_EXTRUDERS)) +#if ENABLED(MIXING_EXTRUDER) && (ENABLED(RETRACT_SYNC_MIXING) || ALL(FILAMENT_LOAD_UNLOAD_GCODES, FILAMENT_UNLOAD_ALL_EXTRUDERS)) #define HAS_MIXER_SYNC_CHANNEL 1 #endif -#if EITHER(DUAL_X_CARRIAGE, MULTI_NOZZLE_DUPLICATION) +#if ANY(DUAL_X_CARRIAGE, MULTI_NOZZLE_DUPLICATION) #define HAS_DUPLICATION_MODE 1 #endif @@ -702,7 +702,7 @@ #undef MENU_ADDAUTOSTART #endif -#if EITHER(SDSUPPORT, SET_PROGRESS_MANUALLY) +#if ANY(SDSUPPORT, SET_PROGRESS_MANUALLY) #define HAS_PRINT_PROGRESS 1 #endif @@ -724,7 +724,7 @@ #define HAS_MEDIA_SUBCALLS 1 #endif -#if HAS_PRINT_PROGRESS && EITHER(PRINT_PROGRESS_SHOW_DECIMALS, SHOW_REMAINING_TIME) +#if HAS_PRINT_PROGRESS && ANY(PRINT_PROGRESS_SHOW_DECIMALS, SHOW_REMAINING_TIME) #define HAS_PRINT_PROGRESS_PERMYRIAD 1 #endif @@ -742,7 +742,7 @@ #if ANY(X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS, Z_MULTI_ENDSTOPS) #define HAS_EXTRA_ENDSTOPS 1 #endif -#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) +#if ANY(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define HAS_SOFTWARE_ENDSTOPS 1 #endif #if ANY(EXTENSIBLE_UI, IS_NEWPANEL, EMERGENCY_PARSER, HAS_ADC_BUTTONS, HAS_DWIN_E3V2) @@ -764,7 +764,7 @@ #define HAS_GCODE_M255 1 #endif -#if EITHER(DIGIPOT_MCP4018, DIGIPOT_MCP4451) +#if ANY(DIGIPOT_MCP4018, DIGIPOT_MCP4451) #define HAS_MOTOR_CURRENT_I2C 1 #endif @@ -797,7 +797,7 @@ // Spindle/Laser power display types // Defined here so sanity checks can use them // -#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) +#if ANY(SPINDLE_FEATURE, LASER_FEATURE) #define HAS_CUTTER 1 #define _CUTTER_POWER_PWM255 1 #define _CUTTER_POWER_PERCENT 2 @@ -870,7 +870,7 @@ #endif #endif -#if EITHER(FYSETC_MINI_12864_2_1, FYSETC_242_OLED_12864) +#if ANY(FYSETC_MINI_12864_2_1, FYSETC_242_OLED_12864) #ifndef LED_USER_PRESET_GREEN #define LED_USER_PRESET_GREEN 128 #endif @@ -905,7 +905,7 @@ #endif #endif -#if BOTH(LED_CONTROL_MENU, NEOPIXEL2_SEPARATE) +#if ALL(LED_CONTROL_MENU, NEOPIXEL2_SEPARATE) #ifndef LED2_USER_PRESET_RED #define LED2_USER_PRESET_RED 255 #endif @@ -928,7 +928,7 @@ #endif // Full Touch Screen needs 'tft/xpt2046' -#if EITHER(TFT_TOUCH_DEVICE_XPT2046, HAS_TFT_LVGL_UI) +#if ANY(TFT_TOUCH_DEVICE_XPT2046, HAS_TFT_LVGL_UI) #define HAS_TFT_XPT2046 1 #endif @@ -1107,7 +1107,7 @@ #endif // Power Monitor sensors -#if EITHER(POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE) +#if ANY(POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE) #define HAS_POWER_MONITOR 1 #if ENABLED(POWER_MONITOR_CURRENT) && (ENABLED(POWER_MONITOR_VOLTAGE) || defined(POWER_MONITOR_FIXED_VOLTAGE)) #define HAS_POWER_MONITOR_WATTS 1 @@ -1126,7 +1126,7 @@ // Flags for Case Light having a color property or a single pin #if ENABLED(CASE_LIGHT_ENABLE) - #if EITHER(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_USE_RGB_LED) + #if ANY(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_USE_RGB_LED) #define CASE_LIGHT_IS_COLOR_LED 1 #else #define NEED_CASE_LIGHT_PIN 1 @@ -1143,7 +1143,7 @@ #define NEED_LSF 1 #endif -#if BOTH(HAS_TFT_LVGL_UI, CUSTOM_MENU_MAIN) +#if ALL(HAS_TFT_LVGL_UI, CUSTOM_MENU_MAIN) #define _HAS_1(N) (defined(MAIN_MENU_ITEM_##N##_DESC) && defined(MAIN_MENU_ITEM_##N##_GCODE)) #define HAS_USER_ITEM(V...) DO(HAS,||,V) #else @@ -1171,12 +1171,12 @@ #if !HAS_MULTI_SERIAL #undef MEATPACK_ON_SERIAL_PORT_2 #endif -#if EITHER(MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2) +#if ANY(MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2) #define HAS_MEATPACK 1 #endif // AVR are (usually) too limited in resources to store the configuration into the binary -#if ENABLED(CONFIGURATION_EMBEDDING) && !defined(FORCE_CONFIG_EMBED) && (defined(__AVR__) || DISABLED(SDSUPPORT) || EITHER(SDCARD_READONLY, DISABLE_M503)) +#if ENABLED(CONFIGURATION_EMBEDDING) && !defined(FORCE_CONFIG_EMBED) && (defined(__AVR__) || DISABLED(SDSUPPORT) || ANY(SDCARD_READONLY, DISABLE_M503)) #undef CONFIGURATION_EMBEDDING #define CANNOT_EMBED_CONFIGURATION defined(__AVR__) #endif @@ -1197,6 +1197,6 @@ #endif // Input shaping -#if EITHER(INPUT_SHAPING_X, INPUT_SHAPING_Y) +#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y) #define HAS_SHAPING 1 #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 3adfddd4620e..9dad0af8dd00 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -38,7 +38,7 @@ #endif // Linear advance uses Jerk since E is an isolated axis -#if BOTH(HAS_JUNCTION_DEVIATION, LIN_ADVANCE) +#if ALL(HAS_JUNCTION_DEVIATION, LIN_ADVANCE) #define HAS_LINEAR_E_JERK 1 #endif @@ -48,7 +48,7 @@ // Set additional flags to let HALs choose in their Conditionals_post.h #if ANY(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION, QSPI_EEPROM) #define USE_EMULATED_EEPROM 1 - #elif EITHER(I2C_EEPROM, SPI_EEPROM) + #elif ANY(I2C_EEPROM, SPI_EEPROM) #define USE_WIRED_EEPROM 1 #elif ENABLED(IIC_BL24CXX_EEPROM) // nothing @@ -253,7 +253,7 @@ #endif // Calibration codes only for non-core axes -#if EITHER(BACKLASH_GCODE, CALIBRATION_GCODE) +#if ANY(BACKLASH_GCODE, CALIBRATION_GCODE) #if ANY(IS_CORE, MARKFORGED_XY, MARKFORGED_YX) #define CAN_CALIBRATE(A,B) (_AXIS(A) == B) #else @@ -451,13 +451,13 @@ #elif ENABLED(AZSMZ_12864) #define _LCD_CONTRAST_MIN 120 #define _LCD_CONTRAST_INIT 190 -#elif EITHER(MKS_LCD12864A, MKS_LCD12864B) +#elif ANY(MKS_LCD12864A, MKS_LCD12864B) #define _LCD_CONTRAST_MIN 120 #define _LCD_CONTRAST_INIT 205 -#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) +#elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define _LCD_CONTRAST_MIN 120 #define _LCD_CONTRAST_INIT 195 -#elif EITHER(MKS_MINI_12864_V3, BTT_MINI_12864_V1) +#elif ANY(MKS_MINI_12864_V3, BTT_MINI_12864_V1) #define _LCD_CONTRAST_MIN 255 #define _LCD_CONTRAST_INIT 255 #elif ENABLED(FYSETC_MINI_12864) @@ -543,7 +543,7 @@ #endif #endif - #if DISABLED(USB_FLASH_DRIVE_SUPPORT) || BOTH(MULTI_VOLUME, VOLUME_SD_ONBOARD) + #if DISABLED(USB_FLASH_DRIVE_SUPPORT) || ALL(MULTI_VOLUME, VOLUME_SD_ONBOARD) #if ENABLED(SDIO_SUPPORT) #define NEED_SD2CARD_SDIO 1 #else @@ -896,13 +896,13 @@ // Add LIB_MAX6675 / LIB_MAX31855 / LIB_MAX31865 to the build_flags // to select a USER library for MAX6675, MAX31855, MAX31865 // - #if BOTH(HAS_MAX6675, LIB_MAX6675) + #if ALL(HAS_MAX6675, LIB_MAX6675) #define USE_LIB_MAX6675 1 #endif - #if BOTH(HAS_MAX31855, LIB_MAX31855) + #if ALL(HAS_MAX31855, LIB_MAX31855) #define USE_ADAFRUIT_MAX31855 1 #endif - #if BOTH(HAS_MAX31865, LIB_MAX31865) + #if ALL(HAS_MAX31865, LIB_MAX31865) #define USE_ADAFRUIT_MAX31865 1 #elif HAS_MAX31865 #define LIB_INTERNAL_MAX31865 1 @@ -1704,7 +1704,7 @@ * - Z_PROBE_SLED uses SOL1_PIN, when defined (unless EXT_SOLENOID is enabled) */ #if ANY(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL, PARKING_EXTRUDER, SOLENOID_PROBE, Z_PROBE_SLED) - #if PIN_EXISTS(SOL0) && (EITHER(MANUAL_SOLENOID_CONTROL, PARKING_EXTRUDER) || BOTH(EXT_SOLENOID, HAS_EXTRUDERS)) + #if PIN_EXISTS(SOL0) && (ANY(MANUAL_SOLENOID_CONTROL, PARKING_EXTRUDER) || ALL(EXT_SOLENOID, HAS_EXTRUDERS)) #define HAS_SOLENOID_0 1 #endif #if PIN_EXISTS(SOL1) && (ANY(MANUAL_SOLENOID_CONTROL, PARKING_EXTRUDER, SOLENOID_PROBE, Z_PROBE_SLED) || TERN0(EXT_SOLENOID, E_STEPPERS > 1)) @@ -1738,7 +1738,7 @@ #if ANY(STEALTHCHOP_E, STEALTHCHOP_XY, STEALTHCHOP_Z, STEALTHCHOP_I, STEALTHCHOP_J, STEALTHCHOP_K, STEALTHCHOP_U, STEALTHCHOP_V, STEALTHCHOP_W) #define STEALTHCHOP_ENABLED 1 #endif - #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) + #if ANY(SENSORLESS_HOMING, SENSORLESS_PROBING) #define USE_SENSORLESS 1 #endif // Disable Z axis sensorless homing if a probe is used to home the Z axis @@ -2432,7 +2432,7 @@ #define HAS_TEMP_ADC_REDUNDANT 1 #endif -#define HAS_TEMP(N) (TEMP_SENSOR_IS_MAX_TC(N) || EITHER(HAS_TEMP_ADC_##N, TEMP_SENSOR_##N##_IS_DUMMY)) +#define HAS_TEMP(N) (TEMP_SENSOR_IS_MAX_TC(N) || ANY(HAS_TEMP_ADC_##N, TEMP_SENSOR_##N##_IS_DUMMY)) #if HAS_HOTEND && HAS_TEMP(0) #define HAS_TEMP_HOTEND 1 #endif @@ -2553,10 +2553,10 @@ #if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0 #define WATCH_BED 1 #endif -#if BOTH(HAS_HEATED_CHAMBER, THERMAL_PROTECTION_CHAMBER) && WATCH_CHAMBER_TEMP_PERIOD > 0 +#if ALL(HAS_HEATED_CHAMBER, THERMAL_PROTECTION_CHAMBER) && WATCH_CHAMBER_TEMP_PERIOD > 0 #define WATCH_CHAMBER 1 #endif -#if BOTH(HAS_COOLER, THERMAL_PROTECTION_COOLER) && WATCH_COOLER_TEMP_PERIOD > 0 +#if ALL(HAS_COOLER, THERMAL_PROTECTION_COOLER) && WATCH_COOLER_TEMP_PERIOD > 0 #define WATCH_COOLER 1 #endif #if NONE(THERMAL_PROTECTION_HOTENDS, THERMAL_PROTECTION_CHAMBER, THERMAL_PROTECTION_BED, THERMAL_PROTECTION_COOLER) @@ -2905,7 +2905,7 @@ */ #define WRITE_HEATER_0P(v) WRITE(HEATER_0_PIN, (v) ^ HEATER_0_INVERTING) -#if EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) +#if ANY(HAS_MULTI_HOTEND, HEATERS_PARALLEL) #define WRITE_HEATER_1(v) WRITE(HEATER_1_PIN, (v) ^ HEATER_1_INVERTING) #if HOTENDS > 2 #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, (v) ^ HEATER_2_INVERTING) @@ -3031,7 +3031,7 @@ /** * Bed Probe dependencies */ -#if EITHER(MESH_BED_LEVELING, HAS_BED_PROBE) +#if ANY(MESH_BED_LEVELING, HAS_BED_PROBE) #ifndef Z_PROBE_OFFSET_RANGE_MIN #define Z_PROBE_OFFSET_RANGE_MIN -20 #endif @@ -3040,7 +3040,7 @@ #endif #endif #if HAS_BED_PROBE - #if BOTH(ENDSTOPPULLUPS, HAS_Z_MIN_PROBE_PIN) + #if ALL(ENDSTOPPULLUPS, HAS_Z_MIN_PROBE_PIN) #define ENDSTOPPULLUP_ZMIN_PROBE #endif #ifndef XY_PROBE_FEEDRATE @@ -3098,16 +3098,16 @@ #undef ADAPTIVE_FAN_SLOWING #undef NO_FAN_SLOWING_IN_PID_TUNING #endif -#if !BOTH(HAS_BED_PROBE, HAS_FAN) +#if !ALL(HAS_BED_PROBE, HAS_FAN) #undef PROBING_FANS_OFF #endif -#if !BOTH(HAS_BED_PROBE, HAS_EXTRUDERS) +#if !ALL(HAS_BED_PROBE, HAS_EXTRUDERS) #undef PROBING_ESTEPPERS_OFF #elif ENABLED(PROBING_STEPPERS_OFF) // PROBING_STEPPERS_OFF implies PROBING_ESTEPPERS_OFF, make sure it is defined #define PROBING_ESTEPPERS_OFF #endif -#if EITHER(ADVANCED_PAUSE_FEATURE, PROBING_HEATERS_OFF) +#if ANY(ADVANCED_PAUSE_FEATURE, PROBING_HEATERS_OFF) #define HEATER_IDLE_HANDLER 1 #endif #if HAS_BED_PROBE && (ANY(PROBING_HEATERS_OFF, PROBING_STEPPERS_OFF, PROBING_ESTEPPERS_OFF, PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0) @@ -3118,7 +3118,7 @@ * Advanced Pause - Filament Change */ #if ENABLED(ADVANCED_PAUSE_FEATURE) - #if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) + #if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI) || ALL(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) #define M600_PURGE_MORE_RESUMABLE 1 #endif #ifndef FILAMENT_CHANGE_SLOW_LOAD_LENGTH @@ -3201,7 +3201,7 @@ /** * Default mesh area is an area with an inset margin on the print area. */ -#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) #if IS_KINEMATIC // Probing points may be verified at compile time within the radius // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") @@ -3255,7 +3255,7 @@ #if ANY(IS_TFTGLCD_PANEL, PCA9632_BUZZER, LCD_USE_I2C_BUZZER) #define USE_MARLINUI_BUZZER 1 #endif -#if EITHER(HAS_BEEPER, USE_MARLINUI_BUZZER) +#if ANY(HAS_BEEPER, USE_MARLINUI_BUZZER) #define HAS_SOUND 1 #endif @@ -3326,7 +3326,7 @@ // Define a starting height for measuring manual probe points #ifndef MANUAL_PROBE_START_Z - #if EITHER(MESH_BED_LEVELING, PROBE_MANUALLY) + #if ANY(MESH_BED_LEVELING, PROBE_MANUALLY) // Leave MANUAL_PROBE_START_Z undefined so the prior Z height will be used. // Note: If Z_CLEARANCE_BETWEEN_MANUAL_PROBES is 0 there will be no raise between points #elif ENABLED(AUTO_BED_LEVELING_UBL) && defined(Z_CLEARANCE_BETWEEN_PROBES) @@ -3352,7 +3352,7 @@ #endif #endif -#if EITHER(HAS_MARLINUI_MENU, TOUCH_UI_FTDI_EVE) +#if ANY(HAS_MARLINUI_MENU, TOUCH_UI_FTDI_EVE) // LCD timeout to status screen default is 15s #ifndef LCD_TIMEOUT_TO_STATUS #define LCD_TIMEOUT_TO_STATUS 15000 @@ -3378,14 +3378,14 @@ #endif // Number of VFAT entries used. Each entry has 13 UTF-16 characters -#if EITHER(SCROLL_LONG_FILENAMES, HAS_DWIN_E3V2) +#if ANY(SCROLL_LONG_FILENAMES, HAS_DWIN_E3V2) #define MAX_VFAT_ENTRIES (5) #else #define MAX_VFAT_ENTRIES (2) #endif // Nozzle park for Delta -#if BOTH(NOZZLE_PARK_FEATURE, DELTA) +#if ALL(NOZZLE_PARK_FEATURE, DELTA) #undef NOZZLE_PARK_Z_FEEDRATE #define NOZZLE_PARK_Z_FEEDRATE NOZZLE_PARK_XY_FEEDRATE #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index ca47353fa3b8..4fbed7860309 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -46,8 +46,8 @@ #if ENABLED(TEST0) || !ENABLED(TEST2) || ENABLED(TEST3) || !ENABLED(TEST1, TEST2, TEST4) #error "ENABLED is borked!" #endif -#if BOTH(TEST0, TEST1) - #error "BOTH is borked!" +#if ALL(TEST0, TEST1) + #error "ALL is borked!" #endif #if DISABLED(TEST1) || !DISABLED(TEST3) || DISABLED(TEST4) || DISABLED(TEST0, TEST1, TEST2, TEST4) || !DISABLED(TEST0, TEST3) #error "DISABLED is borked!" @@ -860,45 +860,45 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif #endif -#if BOTH(ENDSTOPPULLUPS, ENDSTOPPULLDOWNS) +#if ALL(ENDSTOPPULLUPS, ENDSTOPPULLDOWNS) #error "Enable only one of ENDSTOPPULLUPS or ENDSTOPPULLDOWNS." -#elif BOTH(FIL_RUNOUT_PULLUP, FIL_RUNOUT_PULLDOWN) +#elif ALL(FIL_RUNOUT_PULLUP, FIL_RUNOUT_PULLDOWN) #error "Enable only one of FIL_RUNOUT_PULLUP or FIL_RUNOUT_PULLDOWN." -#elif BOTH(ENDSTOPPULLUP_XMAX, ENDSTOPPULLDOWN_XMAX) +#elif ALL(ENDSTOPPULLUP_XMAX, ENDSTOPPULLDOWN_XMAX) #error "Enable only one of ENDSTOPPULLUP_X_MAX or ENDSTOPPULLDOWN_X_MAX." -#elif BOTH(ENDSTOPPULLUP_YMAX, ENDSTOPPULLDOWN_YMAX) +#elif ALL(ENDSTOPPULLUP_YMAX, ENDSTOPPULLDOWN_YMAX) #error "Enable only one of ENDSTOPPULLUP_Y_MAX or ENDSTOPPULLDOWN_Y_MAX." -#elif BOTH(ENDSTOPPULLUP_ZMAX, ENDSTOPPULLDOWN_ZMAX) +#elif ALL(ENDSTOPPULLUP_ZMAX, ENDSTOPPULLDOWN_ZMAX) #error "Enable only one of ENDSTOPPULLUP_Z_MAX or ENDSTOPPULLDOWN_Z_MAX." -#elif BOTH(ENDSTOPPULLUP_IMAX, ENDSTOPPULLDOWN_IMAX) +#elif ALL(ENDSTOPPULLUP_IMAX, ENDSTOPPULLDOWN_IMAX) #error "Enable only one of ENDSTOPPULLUP_I_MAX or ENDSTOPPULLDOWN_I_MAX." -#elif BOTH(ENDSTOPPULLUP_JMAX, ENDSTOPPULLDOWN_JMAX) +#elif ALL(ENDSTOPPULLUP_JMAX, ENDSTOPPULLDOWN_JMAX) #error "Enable only one of ENDSTOPPULLUP_J_MAX or ENDSTOPPULLDOWN_J_MAX." -#elif BOTH(ENDSTOPPULLUP_KMAX, ENDSTOPPULLDOWN_KMAX) +#elif ALL(ENDSTOPPULLUP_KMAX, ENDSTOPPULLDOWN_KMAX) #error "Enable only one of ENDSTOPPULLUP_K_MAX or ENDSTOPPULLDOWN_K_MAX." -#elif BOTH(ENDSTOPPULLUP_UMAX, ENDSTOPPULLDOWN_UMAX) +#elif ALL(ENDSTOPPULLUP_UMAX, ENDSTOPPULLDOWN_UMAX) #error "Enable only one of ENDSTOPPULLUP_U_MAX or ENDSTOPPULLDOWN_U_MAX." -#elif BOTH(ENDSTOPPULLUP_VMAX, ENDSTOPPULLDOWN_VMAX) +#elif ALL(ENDSTOPPULLUP_VMAX, ENDSTOPPULLDOWN_VMAX) #error "Enable only one of ENDSTOPPULLUP_V_MAX or ENDSTOPPULLDOWN_V_MAX." -#elif BOTH(ENDSTOPPULLUP_WMAX, ENDSTOPPULLDOWN_WMAX) +#elif ALL(ENDSTOPPULLUP_WMAX, ENDSTOPPULLDOWN_WMAX) #error "Enable only one of ENDSTOPPULLUP_W_MAX or ENDSTOPPULLDOWN_W_MAX." -#elif BOTH(ENDSTOPPULLUP_XMIN, ENDSTOPPULLDOWN_XMIN) +#elif ALL(ENDSTOPPULLUP_XMIN, ENDSTOPPULLDOWN_XMIN) #error "Enable only one of ENDSTOPPULLUP_X_MIN or ENDSTOPPULLDOWN_X_MIN." -#elif BOTH(ENDSTOPPULLUP_YMIN, ENDSTOPPULLDOWN_YMIN) +#elif ALL(ENDSTOPPULLUP_YMIN, ENDSTOPPULLDOWN_YMIN) #error "Enable only one of ENDSTOPPULLUP_Y_MIN or ENDSTOPPULLDOWN_Y_MIN." -#elif BOTH(ENDSTOPPULLUP_ZMIN, ENDSTOPPULLDOWN_ZMIN) +#elif ALL(ENDSTOPPULLUP_ZMIN, ENDSTOPPULLDOWN_ZMIN) #error "Enable only one of ENDSTOPPULLUP_Z_MIN or ENDSTOPPULLDOWN_Z_MIN." -#elif BOTH(ENDSTOPPULLUP_IMIN, ENDSTOPPULLDOWN_IMIN) +#elif ALL(ENDSTOPPULLUP_IMIN, ENDSTOPPULLDOWN_IMIN) #error "Enable only one of ENDSTOPPULLUP_I_MIN or ENDSTOPPULLDOWN_I_MIN." -#elif BOTH(ENDSTOPPULLUP_JMIN, ENDSTOPPULLDOWN_JMIN) +#elif ALL(ENDSTOPPULLUP_JMIN, ENDSTOPPULLDOWN_JMIN) #error "Enable only one of ENDSTOPPULLUP_J_MIN or ENDSTOPPULLDOWN_J_MIN." -#elif BOTH(ENDSTOPPULLUP_KMIN, ENDSTOPPULLDOWN_KMIN) +#elif ALL(ENDSTOPPULLUP_KMIN, ENDSTOPPULLDOWN_KMIN) #error "Enable only one of ENDSTOPPULLUP_K_MIN or ENDSTOPPULLDOWN_K_MIN." -#elif BOTH(ENDSTOPPULLUP_UMIN, ENDSTOPPULLDOWN_UMIN) +#elif ALL(ENDSTOPPULLUP_UMIN, ENDSTOPPULLDOWN_UMIN) #error "Enable only one of ENDSTOPPULLUP_U_MIN or ENDSTOPPULLDOWN_U_MIN." -#elif BOTH(ENDSTOPPULLUP_VMIN, ENDSTOPPULLDOWN_VMIN) +#elif ALL(ENDSTOPPULLUP_VMIN, ENDSTOPPULLDOWN_VMIN) #error "Enable only one of ENDSTOPPULLUP_V_MIN or ENDSTOPPULLDOWN_V_MIN." -#elif BOTH(ENDSTOPPULLUP_WMIN, ENDSTOPPULLDOWN_WMIN) +#elif ALL(ENDSTOPPULLUP_WMIN, ENDSTOPPULLDOWN_WMIN) #error "Enable only one of ENDSTOPPULLUP_W_MIN or ENDSTOPPULLDOWN_W_MIN." #endif @@ -1007,7 +1007,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS * I2C Position Encoders */ #if ENABLED(I2C_POSITION_ENCODERS) - #if !BOTH(BABYSTEPPING, BABYSTEP_XY) + #if !ALL(BABYSTEPPING, BABYSTEP_XY) #error "I2C_POSITION_ENCODERS requires BABYSTEPPING and BABYSTEP_XY." #elif !WITHIN(I2CPE_ENCODER_CNT, 1, 5) #error "I2CPE_ENCODER_CNT must be between 1 and 5." @@ -1020,11 +1020,11 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #if ENABLED(BABYSTEPPING) #if ENABLED(SCARA) #error "BABYSTEPPING is not implemented for SCARA yet." - #elif ENABLED(BABYSTEP_XY) && EITHER(MARKFORGED_XY, MARKFORGED_YX) + #elif ENABLED(BABYSTEP_XY) && ANY(MARKFORGED_XY, MARKFORGED_YX) #error "BABYSTEPPING only implemented for Z axis on MarkForged." - #elif BOTH(DELTA, BABYSTEP_XY) + #elif ALL(DELTA, BABYSTEP_XY) #error "BABYSTEPPING only implemented for Z axis on deltabots." - #elif BOTH(BABYSTEP_ZPROBE_OFFSET, MESH_BED_LEVELING) + #elif ALL(BABYSTEP_ZPROBE_OFFSET, MESH_BED_LEVELING) #error "MESH_BED_LEVELING and BABYSTEP_ZPROBE_OFFSET is not a valid combination" #elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && !HAS_BED_PROBE #error "BABYSTEP_ZPROBE_OFFSET requires a probe." @@ -1034,7 +1034,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a BABYSTEP_ZPROBE_OFFSET." #elif ENABLED(BABYSTEP_HOTEND_Z_OFFSET) && !HAS_HOTEND_OFFSET #error "BABYSTEP_HOTEND_Z_OFFSET requires 2 or more HOTENDS." - #elif BOTH(BABYSTEP_ALWAYS_AVAILABLE, MOVE_Z_WHEN_IDLE) + #elif ALL(BABYSTEP_ALWAYS_AVAILABLE, MOVE_Z_WHEN_IDLE) #error "BABYSTEP_ALWAYS_AVAILABLE and MOVE_Z_WHEN_IDLE are incompatible." #elif !defined(BABYSTEP_MULTIPLICATOR_Z) #error "BABYSTEPPING requires BABYSTEP_MULTIPLICATOR_Z." @@ -1072,21 +1072,21 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "FIL_RUNOUT3_PIN is required with NUM_RUNOUT_SENSORS >= 3." #elif NUM_RUNOUT_SENSORS >= 2 && !PIN_EXISTS(FIL_RUNOUT2) #error "FIL_RUNOUT2_PIN is required with NUM_RUNOUT_SENSORS >= 2." - #elif BOTH(FIL_RUNOUT1_PULLUP, FIL_RUNOUT1_PULLDOWN) + #elif ALL(FIL_RUNOUT1_PULLUP, FIL_RUNOUT1_PULLDOWN) #error "You can't enable FIL_RUNOUT1_PULLUP and FIL_RUNOUT1_PULLDOWN at the same time." - #elif BOTH(FIL_RUNOUT2_PULLUP, FIL_RUNOUT2_PULLDOWN) + #elif ALL(FIL_RUNOUT2_PULLUP, FIL_RUNOUT2_PULLDOWN) #error "You can't enable FIL_RUNOUT2_PULLUP and FIL_RUNOUT2_PULLDOWN at the same time." - #elif BOTH(FIL_RUNOUT3_PULLUP, FIL_RUNOUT3_PULLDOWN) + #elif ALL(FIL_RUNOUT3_PULLUP, FIL_RUNOUT3_PULLDOWN) #error "You can't enable FIL_RUNOUT3_PULLUP and FIL_RUNOUT3_PULLDOWN at the same time." - #elif BOTH(FIL_RUNOUT4_PULLUP, FIL_RUNOUT4_PULLDOWN) + #elif ALL(FIL_RUNOUT4_PULLUP, FIL_RUNOUT4_PULLDOWN) #error "You can't enable FIL_RUNOUT4_PULLUP and FIL_RUNOUT4_PULLDOWN at the same time." - #elif BOTH(FIL_RUNOUT5_PULLUP, FIL_RUNOUT5_PULLDOWN) + #elif ALL(FIL_RUNOUT5_PULLUP, FIL_RUNOUT5_PULLDOWN) #error "You can't enable FIL_RUNOUT5_PULLUP and FIL_RUNOUT5_PULLDOWN at the same time." - #elif BOTH(FIL_RUNOUT6_PULLUP, FIL_RUNOUT6_PULLDOWN) + #elif ALL(FIL_RUNOUT6_PULLUP, FIL_RUNOUT6_PULLDOWN) #error "You can't enable FIL_RUNOUT6_PULLUP and FIL_RUNOUT6_PULLDOWN at the same time." - #elif BOTH(FIL_RUNOUT7_PULLUP, FIL_RUNOUT7_PULLDOWN) + #elif ALL(FIL_RUNOUT7_PULLUP, FIL_RUNOUT7_PULLDOWN) #error "You can't enable FIL_RUNOUT7_PULLUP and FIL_RUNOUT7_PULLDOWN at the same time." - #elif BOTH(FIL_RUNOUT8_PULLUP, FIL_RUNOUT8_PULLDOWN) + #elif ALL(FIL_RUNOUT8_PULLUP, FIL_RUNOUT8_PULLDOWN) #error "You can't enable FIL_RUNOUT8_PULLUP and FIL_RUNOUT8_PULLDOWN at the same time." #elif FILAMENT_RUNOUT_DISTANCE_MM < 0 #error "FILAMENT_RUNOUT_DISTANCE_MM must be greater than or equal to zero." @@ -1139,7 +1139,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS /** * Individual axis homing is useless for DELTAS */ -#if BOTH(INDIVIDUAL_AXIS_HOMING_MENU, DELTA) +#if ALL(INDIVIDUAL_AXIS_HOMING_MENU, DELTA) #error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with DELTA kinematics." #endif @@ -1381,7 +1381,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS /** * (Magnetic) Parking Extruder requirements */ -#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) +#if ANY(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #if ENABLED(EXT_SOLENOID) #error "(MAGNETIC_)PARKING_EXTRUDER and EXT_SOLENOID are incompatible. (Pins are used twice.)" #elif EXTRUDERS != 2 @@ -1439,7 +1439,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS /** * Magnetic / Electromagnetic Switching Toolhead requirements */ -#if EITHER(MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD) +#if ANY(MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD) #ifndef SWITCHING_TOOLHEAD_Y_POS #error "(ELECTRO)?MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_Y_POS" #elif !defined(SWITCHING_TOOLHEAD_X_POS) @@ -1504,7 +1504,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS /** * Extruder temperature control algorithm - There can be only one! */ -#if BOTH(PIDTEMP, MPCTEMP) +#if ALL(PIDTEMP, MPCTEMP) #error "Only enable PIDTEMP or MPCTEMP, but not both." #endif @@ -1524,7 +1524,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS /** * Bed Heating Options - PID vs Limit Switching */ -#if BOTH(PIDTEMPBED, BED_LIMIT_SWITCHING) +#if ALL(PIDTEMPBED, BED_LIMIT_SWITCHING) #error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED." #endif @@ -1547,7 +1547,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS /** * Chamber Heating Options - PID vs Limit Switching */ -#if BOTH(PIDTEMPCHAMBER, CHAMBER_LIMIT_SWITCHING) +#if ALL(PIDTEMPCHAMBER, CHAMBER_LIMIT_SWITCHING) #error "To use CHAMBER_LIMIT_SWITCHING you must disable PIDTEMPCHAMBER." #endif @@ -1698,7 +1698,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS /** * Some things should not be used on Belt Printers */ -#if BOTH(BELTPRINTER, HAS_LEVELING) +#if ALL(BELTPRINTER, HAS_LEVELING) #error "Bed Leveling is not compatible with BELTPRINTER." #endif @@ -1720,7 +1720,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS /** * Z_PROBE_SLED is incompatible with DELTA */ - #if BOTH(Z_PROBE_SLED, DELTA) + #if ALL(Z_PROBE_SLED, DELTA) #error "You cannot use Z_PROBE_SLED with DELTA." #endif @@ -1857,7 +1857,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS /** * Mag mounted probe requirements */ - #if BOTH(MAG_MOUNTED_PROBE, USE_PROBE_FOR_Z_HOMING) && DISABLED(Z_SAFE_HOMING) + #if ALL(MAG_MOUNTED_PROBE, USE_PROBE_FOR_Z_HOMING) && DISABLED(Z_SAFE_HOMING) #error "MAG_MOUNTED_PROBE requires Z_SAFE_HOMING if it's being used to home Z." #endif @@ -2074,7 +2074,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif #endif -#if BOTH(PREHEAT_BEFORE_PROBING, PREHEAT_BEFORE_LEVELING) +#if ALL(PREHEAT_BEFORE_PROBING, PREHEAT_BEFORE_LEVELING) #error "Disable PREHEAT_BEFORE_LEVELING when using PREHEAT_BEFORE_PROBING." #endif @@ -2192,7 +2192,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS * Make sure DISABLE_[XYZ] compatible with selected homing options */ #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K, DISABLE_U, DISABLE_V, DISABLE_W) - #if EITHER(HOME_AFTER_DEACTIVATE, Z_SAFE_HOMING) + #if ANY(HOME_AFTER_DEACTIVATE, Z_SAFE_HOMING) #error "DISABLE_[XYZIJKUVW] is not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING." #endif #endif @@ -2215,7 +2215,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "POWER_MONITOR_CURRENT requires a valid POWER_MONITOR_CURRENT_PIN." #elif ENABLED(POWER_MONITOR_VOLTAGE) && !PIN_EXISTS(POWER_MONITOR_VOLTAGE) #error "POWER_MONITOR_VOLTAGE requires POWER_MONITOR_VOLTAGE_PIN to be defined." -#elif BOTH(POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE) && POWER_MONITOR_CURRENT_PIN == POWER_MONITOR_VOLTAGE_PIN +#elif ALL(POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE) && POWER_MONITOR_CURRENT_PIN == POWER_MONITOR_VOLTAGE_PIN #error "POWER_MONITOR_CURRENT_PIN and POWER_MONITOR_VOLTAGE_PIN must be different." #endif @@ -2247,7 +2247,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #if ENABLED(SAV_3DGLCD) #if NONE(U8GLIB_SSD1306, U8GLIB_SH1106) #error "Enable a SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106." - #elif BOTH(U8GLIB_SSD1306, U8GLIB_SH1106) + #elif ALL(U8GLIB_SSD1306, U8GLIB_SH1106) #error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106." #endif #endif @@ -2509,7 +2509,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "TEMP_SENSOR_0 MAX thermocouple requires TEMP_0_CS_PIN." #elif HAS_HOTEND && !HAS_TEMP_HOTEND && !TEMP_SENSOR_0_IS_DUMMY #error "TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board." -#elif EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) && !HAS_HEATER_1 +#elif ANY(HAS_MULTI_HOTEND, HEATERS_PARALLEL) && !HAS_HEATER_1 #error "HEATER_1_PIN is not defined. TEMP_SENSOR_1 might not be set, or the board (not EEB / EEF?) doesn't define a pin." #endif @@ -2652,7 +2652,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS /** * FYSETC/MKS/BTT Mini Panel Requirements */ -#if EITHER(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1) +#if ANY(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1) #ifndef NEO_RGB #define NEO_RGB 123 #define FAUX_RGB 1 @@ -2666,7 +2666,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #undef NEO_RGB #undef FAUX_RGB #endif -#elif EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED) +#elif ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED) #error "Your FYSETC Mini Panel requires RGB_LED." #endif @@ -2815,14 +2815,14 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "Enable USE_ZMIN_PLUG when homing Z to MIN." #elif Z_HOME_TO_MAX && ENABLED(USE_PROBE_FOR_Z_HOMING) #error "Z_HOME_DIR must be -1 when homing Z with the probe." - #elif BOTH(HOMING_Z_WITH_PROBE, Z_MULTI_ENDSTOPS) + #elif ALL(HOMING_Z_WITH_PROBE, Z_MULTI_ENDSTOPS) #error "Z_MULTI_ENDSTOPS is incompatible with USE_PROBE_FOR_Z_HOMING." #elif Z_HOME_TO_MAX && DISABLED(USE_ZMAX_PLUG) #error "Enable USE_ZMAX_PLUG when homing Z to MAX." #endif #endif -#if BOTH(HOME_Z_FIRST, USE_PROBE_FOR_Z_HOMING) +#if ALL(HOME_Z_FIRST, USE_PROBE_FOR_Z_HOMING) #error "HOME_Z_FIRST can't be used when homing Z with a probe." #endif @@ -2957,21 +2957,21 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS * Fan check */ #if HAS_FANCHECK - #if BOTH(E0_FAN_TACHO_PULLUP, E0_FAN_TACHO_PULLDOWN) + #if ALL(E0_FAN_TACHO_PULLUP, E0_FAN_TACHO_PULLDOWN) #error "Enable only one of E0_FAN_TACHO_PULLUP or E0_FAN_TACHO_PULLDOWN." - #elif BOTH(E1_FAN_TACHO_PULLUP, E1_FAN_TACHO_PULLDOWN) + #elif ALL(E1_FAN_TACHO_PULLUP, E1_FAN_TACHO_PULLDOWN) #error "Enable only one of E1_FAN_TACHO_PULLUP or E1_FAN_TACHO_PULLDOWN." - #elif BOTH(E2_FAN_TACHO_PULLUP, E2_FAN_TACHO_PULLDOWN) + #elif ALL(E2_FAN_TACHO_PULLUP, E2_FAN_TACHO_PULLDOWN) #error "Enable only one of E2_FAN_TACHO_PULLUP or E2_FAN_TACHO_PULLDOWN." - #elif BOTH(E3_FAN_TACHO_PULLUP, E3_FAN_TACHO_PULLDOWN) + #elif ALL(E3_FAN_TACHO_PULLUP, E3_FAN_TACHO_PULLDOWN) #error "Enable only one of E3_FAN_TACHO_PULLUP or E3_FAN_TACHO_PULLDOWN." - #elif BOTH(E4_FAN_TACHO_PULLUP, E4_FAN_TACHO_PULLDOWN) + #elif ALL(E4_FAN_TACHO_PULLUP, E4_FAN_TACHO_PULLDOWN) #error "Enable only one of E4_FAN_TACHO_PULLUP or E4_FAN_TACHO_PULLDOWN." - #elif BOTH(E5_FAN_TACHO_PULLUP, E5_FAN_TACHO_PULLDOWN) + #elif ALL(E5_FAN_TACHO_PULLUP, E5_FAN_TACHO_PULLDOWN) #error "Enable only one of E5_FAN_TACHO_PULLUP or E5_FAN_TACHO_PULLDOWN." - #elif BOTH(E6_FAN_TACHO_PULLUP, E6_FAN_TACHO_PULLDOWN) + #elif ALL(E6_FAN_TACHO_PULLUP, E6_FAN_TACHO_PULLDOWN) #error "Enable only one of E6_FAN_TACHO_PULLUP or E6_FAN_TACHO_PULLDOWN." - #elif BOTH(E7_FAN_TACHO_PULLUP, E7_FAN_TACHO_PULLDOWN) + #elif ALL(E7_FAN_TACHO_PULLUP, E7_FAN_TACHO_PULLDOWN) #error "Enable only one of E7_FAN_TACHO_PULLUP or E7_FAN_TACHO_PULLDOWN." #endif #elif ENABLED(AUTO_REPORT_FANS) @@ -3102,7 +3102,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "TFT_GENERIC requires either TFT_INTERFACE_FSMC or TFT_INTERFACE_SPI interface." #endif -#if BOTH(TFT_INTERFACE_FSMC, TFT_INTERFACE_SPI) +#if ALL(TFT_INTERFACE_FSMC, TFT_INTERFACE_SPI) #error "Please enable only one of TFT_INTERFACE_SPI or TFT_INTERFACE_SPI." #endif @@ -3126,7 +3126,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "GRAPHICAL_TFT_UPSCALE must be between 2 and 8." #endif -#if BOTH(CHIRON_TFT_STANDARD, CHIRON_TFT_NEW) +#if ALL(CHIRON_TFT_STANDARD, CHIRON_TFT_NEW) #error "Please select only one of CHIRON_TFT_STANDARD or CHIRON_TFT_NEW." #endif @@ -3144,7 +3144,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif #endif -#if EITHER(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0) && SD_CONNECTION_IS(LCD) +#if ANY(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0) && SD_CONNECTION_IS(LCD) #error "SDCARD_CONNECTION cannot be set to LCD for the enabled TFT. No available SD card reader." #endif @@ -3154,25 +3154,25 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #if ENABLED(DWIN_CREALITY_LCD) #if DISABLED(SDSUPPORT) #error "DWIN_CREALITY_LCD requires SDSUPPORT to be enabled." - #elif EITHER(PID_EDIT_MENU, PID_AUTOTUNE_MENU) + #elif ANY(PID_EDIT_MENU, PID_AUTOTUNE_MENU) #error "DWIN_CREALITY_LCD does not support PID_EDIT_MENU or PID_AUTOTUNE_MENU." - #elif EITHER(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU) + #elif ANY(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU) #error "DWIN_CREALITY_LCD does not support MPC_EDIT_MENU or MPC_AUTOTUNE_MENU." #elif ENABLED(LCD_BED_TRAMMING) #error "DWIN_CREALITY_LCD does not support LCD_BED_TRAMMING." - #elif BOTH(LCD_BED_LEVELING, PROBE_MANUALLY) + #elif ALL(LCD_BED_LEVELING, PROBE_MANUALLY) #error "DWIN_CREALITY_LCD does not support LCD_BED_LEVELING with PROBE_MANUALLY." #endif #elif ENABLED(DWIN_LCD_PROUI) #if DISABLED(SDSUPPORT) #error "DWIN_LCD_PROUI requires SDSUPPORT to be enabled." - #elif EITHER(PID_EDIT_MENU, PID_AUTOTUNE_MENU) + #elif ANY(PID_EDIT_MENU, PID_AUTOTUNE_MENU) #error "DWIN_LCD_PROUI does not support PID_EDIT_MENU or PID_AUTOTUNE_MENU." - #elif EITHER(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU) + #elif ANY(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU) #error "DWIN_LCD_PROUI does not support MPC_EDIT_MENU or MPC_AUTOTUNE_MENU." #elif ENABLED(LCD_BED_TRAMMING) #error "DWIN_LCD_PROUI does not support LCD_BED_TRAMMING." - #elif BOTH(LCD_BED_LEVELING, PROBE_MANUALLY) + #elif ALL(LCD_BED_LEVELING, PROBE_MANUALLY) #error "DWIN_LCD_PROUI does not support LCD_BED_LEVELING with PROBE_MANUALLY." #endif #endif @@ -3237,7 +3237,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #else #if HAS_DGUS_LCD #error "The DGUS LCD requires LCD_SERIAL_PORT to be defined." - #elif EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON) + #elif ANY(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON) #error "The ANYCUBIC LCD requires LCD_SERIAL_PORT to be defined." #elif ENABLED(MALYAN_LCD) #error "MALYAN_LCD requires LCD_SERIAL_PORT to be defined." @@ -3644,7 +3644,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif #endif - #if ENABLED(DELTA) && !BOTH(STEALTHCHOP_XY, STEALTHCHOP_Z) + #if ENABLED(DELTA) && !ALL(STEALTHCHOP_XY, STEALTHCHOP_Z) #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP_XY and STEALTHCHOP_Z." #elif ENDSTOP_NOISE_THRESHOLD #error "SENSORLESS_HOMING is incompatible with ENDSTOP_NOISE_THRESHOLD." @@ -3683,7 +3683,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "CoreXZ requires both X and Z to use sensorless homing if either one does." #elif CORE_IS_YZ && Y_SENSORLESS != Z_SENSORLESS && !HOMING_Z_WITH_PROBE #error "CoreYZ requires both Y and Z to use sensorless homing if either one does." -#elif EITHER(MARKFORGED_XY, MARKFORGED_YX) && X_SENSORLESS != Y_SENSORLESS +#elif ANY(MARKFORGED_XY, MARKFORGED_YX) && X_SENSORLESS != Y_SENSORLESS #error "MARKFORGED requires both X and Y to use sensorless homing if either one does." #endif @@ -3770,7 +3770,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS * Digipot requirement */ #if HAS_MOTOR_CURRENT_I2C - #if BOTH(DIGIPOT_MCP4018, DIGIPOT_MCP4451) + #if ALL(DIGIPOT_MCP4018, DIGIPOT_MCP4451) #error "Enable only one of DIGIPOT_MCP4018 or DIGIPOT_MCP4451." #elif !MB(MKS_SBASE, AZTEEG_X5_GT, AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI) \ && (!defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) || !defined(DIGIPOTS_I2C_SDA_E0) || !defined(DIGIPOTS_I2C_SDA_E1)) @@ -3841,7 +3841,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #undef _PLUS_TEST #undef _EXTRA_NOTE -#if BOTH(CNC_COORDINATE_SYSTEMS, NO_WORKSPACE_OFFSETS) +#if ALL(CNC_COORDINATE_SYSTEMS, NO_WORKSPACE_OFFSETS) #error "CNC_COORDINATE_SYSTEMS is incompatible with NO_WORKSPACE_OFFSETS." #endif @@ -3877,18 +3877,18 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #endif #endif -#if BOTH(X_AXIS_TWIST_COMPENSATION, NOZZLE_AS_PROBE) +#if ALL(X_AXIS_TWIST_COMPENSATION, NOZZLE_AS_PROBE) #error "X_AXIS_TWIST_COMPENSATION is incompatible with NOZZLE_AS_PROBE." #endif #if ENABLED(POWER_LOSS_RECOVERY) #if ENABLED(BACKUP_POWER_SUPPLY) && !PIN_EXISTS(POWER_LOSS) #error "BACKUP_POWER_SUPPLY requires a POWER_LOSS_PIN." - #elif BOTH(POWER_LOSS_PULLUP, POWER_LOSS_PULLDOWN) + #elif ALL(POWER_LOSS_PULLUP, POWER_LOSS_PULLDOWN) #error "You can't enable POWER_LOSS_PULLUP and POWER_LOSS_PULLDOWN at the same time." #elif ENABLED(POWER_LOSS_RECOVER_ZHOME) && Z_HOME_TO_MAX #error "POWER_LOSS_RECOVER_ZHOME is not needed on a machine that homes to ZMAX." - #elif BOTH(IS_CARTESIAN, POWER_LOSS_RECOVER_ZHOME) && Z_HOME_TO_MIN && !defined(POWER_LOSS_ZHOME_POS) + #elif ALL(IS_CARTESIAN, POWER_LOSS_RECOVER_ZHOME) && Z_HOME_TO_MIN && !defined(POWER_LOSS_ZHOME_POS) #error "POWER_LOSS_RECOVER_ZHOME requires POWER_LOSS_ZHOME_POS for a Cartesian that homes to ZMIN." #endif #endif @@ -3950,7 +3950,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #error "BACKLASH_COMPENSATION requires BACKLASH_DISTANCE_MM." #elif !defined(BACKLASH_CORRECTION) #error "BACKLASH_COMPENSATION requires BACKLASH_CORRECTION." - #elif EITHER(MARKFORGED_XY, MARKFORGED_YX) + #elif ANY(MARKFORGED_XY, MARKFORGED_YX) constexpr float backlash_arr[] = BACKLASH_DISTANCE_MM; static_assert(!backlash_arr[CORE_AXIS_1] && !backlash_arr[CORE_AXIS_2], "BACKLASH_COMPENSATION can only apply to " STRINGIFY(NORMAL_AXIS) " on a MarkForged system."); @@ -4000,7 +4000,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); /** * Require soft endstops for certain setups */ -#if !BOTH(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) +#if !ALL(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #if ENABLED(DUAL_X_CARRIAGE) #error "DUAL_X_CARRIAGE requires both MIN_ and MAX_SOFTWARE_ENDSTOPS." #elif HAS_HOTEND_OFFSET @@ -4061,7 +4061,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #endif #define _PIN_CONFLICT(P) (PIN_EXISTS(P) && P##_PIN == SPINDLE_LASER_PWM_PIN) - #if BOTH(SPINDLE_FEATURE, LASER_FEATURE) + #if ALL(SPINDLE_FEATURE, LASER_FEATURE) #error "Enable only one of SPINDLE_FEATURE or LASER_FEATURE." #elif NONE(SPINDLE_SERVO, SPINDLE_LASER_USE_PWM) && !PIN_EXISTS(SPINDLE_LASER_ENA) #error "(SPINDLE|LASER)_FEATURE requires SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_USE_PWM, or SPINDLE_SERVO to control the power." @@ -4172,7 +4172,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #error "ESP3D_WIFISUPPORT requires an ESP32 MOTHERBOARD." #elif ENABLED(WEBSUPPORT) && NONE(ARDUINO_ARCH_ESP32, WIFISUPPORT) #error "WEBSUPPORT requires WIFISUPPORT and an ESP32 MOTHERBOARD." -#elif BOTH(ESP3D_WIFISUPPORT, WIFISUPPORT) +#elif ALL(ESP3D_WIFISUPPORT, WIFISUPPORT) #error "Enable only one of ESP3D_WIFISUPPORT or WIFISUPPORT." #endif @@ -4190,14 +4190,14 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); /** * Sanity Check for MEATPACK and BINARY_FILE_TRANSFER Features */ -#if BOTH(HAS_MEATPACK, BINARY_FILE_TRANSFER) +#if ALL(HAS_MEATPACK, BINARY_FILE_TRANSFER) #error "Either enable MEATPACK_ON_SERIAL_PORT_* or BINARY_FILE_TRANSFER, not both." #endif /** * Sanity Check for Slim LCD Menus and Probe Offset Wizard */ -#if BOTH(SLIM_LCD_MENUS, PROBE_OFFSET_WIZARD) +#if ALL(SLIM_LCD_MENUS, PROBE_OFFSET_WIZARD) #error "SLIM_LCD_MENUS disables \"Advanced Settings > Probe Offsets > PROBE_OFFSET_WIZARD.\"" #endif @@ -4219,7 +4219,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); /** * Sanity check for MIXING_EXTRUDER & DISTINCT_E_FACTORS these are not compatible */ -#if BOTH(MIXING_EXTRUDER, DISTINCT_E_FACTORS) +#if ALL(MIXING_EXTRUDER, DISTINCT_E_FACTORS) #error "MIXING_EXTRUDER can't be used with DISTINCT_E_FACTORS. But you may use SINGLENOZZLE with DISTINCT_E_FACTORS." #endif @@ -4332,7 +4332,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #endif // Check requirements for upload.py -#if ENABLED(XFER_BUILD) && !BOTH(BINARY_FILE_TRANSFER, CUSTOM_FIRMWARE_UPLOAD) +#if ENABLED(XFER_BUILD) && !ALL(BINARY_FILE_TRANSFER, CUSTOM_FIRMWARE_UPLOAD) #error "BINARY_FILE_TRANSFER and CUSTOM_FIRMWARE_UPLOAD are required for custom upload." #endif @@ -4352,12 +4352,12 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #error "Input Shaping is not compatible with POLARGRAPH kinematics." #elif ENABLED(DIRECT_STEPPING) #error "Input Shaping is not compatible with DIRECT_STEPPING." - #elif BOTH(INPUT_SHAPING_X, CORE_IS_XZ) + #elif ALL(INPUT_SHAPING_X, CORE_IS_XZ) #error "INPUT_SHAPING_X is not supported with COREXZ." - #elif BOTH(INPUT_SHAPING_Y, CORE_IS_YZ) + #elif ALL(INPUT_SHAPING_Y, CORE_IS_YZ) #error "INPUT_SHAPING_Y is not supported with COREYZ." #elif ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX) - #if !BOTH(INPUT_SHAPING_X, INPUT_SHAPING_Y) + #if !ALL(INPUT_SHAPING_X, INPUT_SHAPING_Y) #error "INPUT_SHAPING_X and INPUT_SHAPING_Y must both be enabled for COREXY, COREYX, or MARKFORGED_*." #else static_assert(SHAPING_FREQ_X == SHAPING_FREQ_Y, "SHAPING_FREQ_X and SHAPING_FREQ_Y must be the same for COREXY / COREYX / MARKFORGED_*."); diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 9b3d69860736..1874d04115cd 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -749,17 +749,17 @@ /** * FYSETC/MKS/BTT Mini Panel backlighting */ -#if EITHER(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1) && !ALL(NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, LED_COLOR_PRESETS) +#if ANY(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1) && !ALL(NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, LED_COLOR_PRESETS) #warning "Your FYSETC/MKS/BTT Mini Panel works best with NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, and LED_COLOR_PRESETS." #endif -#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED) +#if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED) #warning "Your FYSETC Mini Panel works best with RGB_LED." -#elif EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP) +#elif ANY(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP) #warning "Your FYSETC Mini Panel works best with LED_USER_PRESET_STARTUP." #endif -#if EITHER(FYSETC_242_OLED_12864, FYSETC_MINI_12864) && BOTH(PSU_CONTROL, HAS_COLOR_LEDS) && !LED_POWEROFF_TIMEOUT +#if ANY(FYSETC_242_OLED_12864, FYSETC_MINI_12864) && ALL(PSU_CONTROL, HAS_COLOR_LEDS) && !LED_POWEROFF_TIMEOUT #warning "Your FYSETC display with PSU_CONTROL works best with LED_POWEROFF_TIMEOUT." #endif diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index 8817ad74ad50..b6bf45dc5ebf 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -41,12 +41,12 @@ #include "../../module/planner.h" #include "../../module/motion.h" -#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) +#if DISABLED(LCD_PROGRESS_BAR) && ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT) #include "../../feature/filwidth.h" #include "../../gcode/parser.h" #endif -#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) +#if ANY(HAS_COOLER, LASER_COOLANT_FLOW_METER) #include "../../feature/cooler.h" #endif @@ -70,7 +70,7 @@ LCD_CLASS lcd(LCD_I2C_ADDRESS, LCD_I2C_PIN_EN, LCD_I2C_PIN_RW, LCD_I2C_PIN_RS, LCD_I2C_PIN_D4, LCD_I2C_PIN_D5, LCD_I2C_PIN_D6, LCD_I2C_PIN_D7); -#elif EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) +#elif ANY(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) LCD_CLASS lcd(LCD_I2C_ADDRESS OPTARG(DETECT_I2C_LCD_DEVICE, 1)); @@ -289,7 +289,7 @@ void MarlinUI::set_custom_characters(const HD44780CharSet screen_charset/*=CHARS #endif // LCD_PROGRESS_BAR - #if BOTH(SDSUPPORT, HAS_MARLINUI_MENU) + #if ALL(SDSUPPORT, HAS_MARLINUI_MENU) // CHARSET_MENU const static PROGMEM byte refresh[8] = { @@ -339,7 +339,7 @@ void MarlinUI::set_custom_characters(const HD44780CharSet screen_charset/*=CHARS #endif { createChar_P(LCD_STR_UPLEVEL[0], uplevel); - #if BOTH(SDSUPPORT, HAS_MARLINUI_MENU) + #if ALL(SDSUPPORT, HAS_MARLINUI_MENU) // SD Card sub-menu special characters createChar_P(LCD_STR_REFRESH[0], refresh); createChar_P(LCD_STR_FOLDER[0], folder); @@ -687,7 +687,7 @@ void MarlinUI::draw_status_message(const bool blink) { if (progress > 2) return draw_progress_bar(progress); } - #elif BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #elif ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT) // Alternate Status message and Filament display if (ELAPSED(millis(), next_filament_display)) { @@ -1015,7 +1015,7 @@ void MarlinUI::draw_status_screen() { uint16_t per; #if HAS_FAN0 if (true - #if BOTH(HAS_EXTRUDERS, ADAPTIVE_FAN_SLOWING) + #if ALL(HAS_EXTRUDERS, ADAPTIVE_FAN_SLOWING) && (blink || thermalManager.fan_speed_scaler[0] < 128) #endif ) { diff --git a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp index f87d76cef78c..a784e0b73bc1 100644 --- a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp +++ b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp @@ -52,12 +52,12 @@ #include "../../module/planner.h" #include "../../module/motion.h" -#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) +#if DISABLED(LCD_PROGRESS_BAR) && ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT) #include "../../feature/filwidth.h" #include "../../gcode/parser.h" #endif -#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) +#if ANY(HAS_COOLER, LASER_COOLANT_FLOW_METER) #include "../../feature/cooler.h" #endif @@ -141,7 +141,7 @@ static uint8_t PanelDetected = 0; #if ANY(__AVR__, TARGET_LPC1768, __STM32F1__, ARDUINO_ARCH_SAM, __SAMD51__, __MK20DX256__, __MK64FX512__) #define SPI_SEND_ONE(V) SPI.transfer(V); #define SPI_SEND_TWO(V) SPI.transfer16(V); -#elif EITHER(STM32F4xx, STM32F1xx) +#elif ANY(STM32F4xx, STM32F1xx) #define SPI_SEND_ONE(V) SPI.transfer(V, SPI_CONTINUE); #define SPI_SEND_TWO(V) SPI.transfer16(V, SPI_CONTINUE); #elif defined(ARDUINO_ARCH_ESP32) @@ -151,7 +151,7 @@ static uint8_t PanelDetected = 0; #if ANY(__AVR__, ARDUINO_ARCH_SAM, __SAMD51__, __MK20DX256__, __MK64FX512__) #define SPI_SEND_SOME(V,L,Z) SPI.transfer(&V[Z], L); -#elif EITHER(STM32F4xx, STM32F1xx) +#elif ANY(STM32F4xx, STM32F1xx) #define SPI_SEND_SOME(V,L,Z) SPI.transfer(&V[Z], L, SPI_CONTINUE); #elif ANY(TARGET_LPC1768, __STM32F1__, ARDUINO_ARCH_ESP32) #define SPI_SEND_SOME(V,L,Z) do{ for (uint16_t i = 0; i < L; i++) SPI_SEND_ONE(V[(Z)+i]); }while(0) @@ -290,7 +290,7 @@ uint8_t MarlinUI::read_slow_buttons() { Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, 2, 0, 0, 1); #elif defined(STM32F1) Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, (uint8_t)2); - #elif EITHER(STM32F4xx, TARGET_LPC1768) + #elif ANY(STM32F4xx, TARGET_LPC1768) Wire.requestFrom(LCD_I2C_ADDRESS, 2); #endif encoderDiff += Wire.read(); @@ -672,7 +672,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const void MarlinUI::draw_status_message(const bool blink) { if (!PanelDetected) return; lcd_moveto(0, 3); - #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT) // Alternate Status message and Filament display if (ELAPSED(millis(), next_filament_display)) { diff --git a/Marlin/src/lcd/buttons.h b/Marlin/src/lcd/buttons.h index 58471239bbfb..601e8a70ae05 100644 --- a/Marlin/src/lcd/buttons.h +++ b/Marlin/src/lcd/buttons.h @@ -38,7 +38,7 @@ #define HAS_SLOW_BUTTONS 1 #endif -#if EITHER(HAS_DIGITAL_BUTTONS, HAS_DWIN_E3V2) +#if ANY(HAS_DIGITAL_BUTTONS, HAS_DWIN_E3V2) // Wheel spin pins where BA is 00, 10, 11, 01 (1 bit always changes) #define BLEN_A 0 #define BLEN_B 1 @@ -149,7 +149,7 @@ #ifndef EN_C #define EN_C 0 #endif -#if BUTTON_EXISTS(BACK) || EITHER(HAS_TOUCH_BUTTONS, IS_TFTGLCD_PANEL) +#if BUTTON_EXISTS(BACK) || ANY(HAS_TOUCH_BUTTONS, IS_TFTGLCD_PANEL) #define BLEN_D 3 #define EN_D _BV(BLEN_D) #else diff --git a/Marlin/src/lcd/dogm/dogm_Statusscreen.h b/Marlin/src/lcd/dogm/dogm_Statusscreen.h index 8d0ab4efbe46..9eec9d198717 100644 --- a/Marlin/src/lcd/dogm/dogm_Statusscreen.h +++ b/Marlin/src/lcd/dogm/dogm_Statusscreen.h @@ -143,7 +143,7 @@ // Can also be overridden in Configuration_adv.h // If you can afford it, try the 3-frame fan animation! // Don't compile in the fan animation with no fan -#if !HAS_FAN0 || (HOTENDS == 5 || (HOTENDS == 4 && BED_OR_CHAMBER) || BOTH(STATUS_COMBINE_HEATERS, HAS_HEATED_CHAMBER)) +#if !HAS_FAN0 || (HOTENDS == 5 || (HOTENDS == 4 && BED_OR_CHAMBER) || ALL(STATUS_COMBINE_HEATERS, HAS_HEATED_CHAMBER)) #undef STATUS_FAN_FRAMES #elif !STATUS_FAN_FRAMES #define STATUS_FAN_FRAMES 2 @@ -253,7 +253,7 @@ ((STATUS_CHAMBER_WIDTH || STATUS_FAN_WIDTH || STATUS_BED_WIDTH) && STATUS_HOTEND_BITMAPS == 4) #define STATUS_HEATERS_X 5 #else - #if BOTH(STATUS_COMBINE_HEATERS, HAS_HEATED_BED) && HOTENDS <= 4 + #if ALL(STATUS_COMBINE_HEATERS, HAS_HEATED_BED) && HOTENDS <= 4 #define STATUS_HEATERS_X 5 #else #define STATUS_HEATERS_X 8 // Like the included bitmaps @@ -742,22 +742,22 @@ #if HAS_FAN0 && STATUS_FAN_WIDTH && HOTENDS <= 4 && defined(STATUS_FAN_FRAMES) #define DO_DRAW_FAN 1 #endif -#if BOTH(HAS_HOTEND, STATUS_HOTEND_ANIM) +#if ALL(HAS_HOTEND, STATUS_HOTEND_ANIM) #define ANIM_HOTEND 1 #endif -#if BOTH(DO_DRAW_BED, STATUS_BED_ANIM) +#if ALL(DO_DRAW_BED, STATUS_BED_ANIM) #define ANIM_BED 1 #endif -#if BOTH(DO_DRAW_CHAMBER, STATUS_CHAMBER_ANIM) +#if ALL(DO_DRAW_CHAMBER, STATUS_CHAMBER_ANIM) #define ANIM_CHAMBER 1 #endif -#if BOTH(DO_DRAW_CUTTER, STATUS_CUTTER_ANIM) +#if ALL(DO_DRAW_CUTTER, STATUS_CUTTER_ANIM) #define ANIM_CUTTER 1 #endif -#if BOTH(DO_DRAW_COOLER, STATUS_COOLER_ANIM) +#if ALL(DO_DRAW_COOLER, STATUS_COOLER_ANIM) #define ANIM_COOLER 1 #endif -#if BOTH(DO_DRAW_FLOWMETER, STATUS_FLOWMETER_ANIM) +#if ALL(DO_DRAW_FLOWMETER, STATUS_FLOWMETER_ANIM) #define ANIM_FLOWMETER 1 #endif #if ANIM_HOTEND || ANIM_BED || ANIM_CHAMBER || ANIM_CUTTER diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index 1a86058b943c..1f1cfb398b07 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -628,7 +628,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop #endif // AUTO_BED_LEVELING_UBL - #if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) + #if ANY(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) // // Draw knob rotation => Z motion key for: diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.h b/Marlin/src/lcd/dogm/marlinui_DOGM.h index f70621574c33..ea4239f40d53 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.h +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.h @@ -129,7 +129,7 @@ #define U8G_CLASS U8GLIB_SSD1306_128X64 // 8 stripes #endif -#elif EITHER(FYSETC_242_OLED_12864, K3D_242_OLED_CONTROLLER) +#elif ANY(FYSETC_242_OLED_12864, K3D_242_OLED_CONTROLLER) // FYSETC OLED 2.42" 128 × 64 Full Graphics Controller // or K3D OLED 2.42" 128 × 64 Full Graphics Controller @@ -153,7 +153,7 @@ #define U8G_CLASS U8GLIB_SH1306_128X64 // 8 stripes #endif -#elif EITHER(MKS_12864OLED, ZONESTAR_12864OLED) +#elif ANY(MKS_12864OLED, ZONESTAR_12864OLED) // MKS 128x64 (SH1106) OLED I2C LCD // - or - diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index cba58f5c02f9..bc39cd288ac9 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -55,7 +55,7 @@ #include "../../feature/spindle_laser.h" #endif -#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) +#if ANY(HAS_COOLER, LASER_COOLANT_FLOW_METER) #include "../../feature/cooler.h" #endif @@ -126,7 +126,7 @@ #define MAX_HOTEND_DRAW _MIN(HOTENDS, ((LCD_PIXEL_WIDTH - (STATUS_LOGO_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) / (STATUS_HEATERS_XSPACE))) #endif -#if EITHER(DO_DRAW_BED, DO_DRAW_HOTENDS) +#if ANY(DO_DRAW_BED, DO_DRAW_HOTENDS) #define STATUS_HEATERS_BOT (STATUS_HEATERS_Y + STATUS_HEATERS_HEIGHT - 1) #endif @@ -588,7 +588,7 @@ void MarlinUI::draw_status_screen() { #if DO_DRAW_BED && DISABLED(STATUS_COMBINE_HEATERS) #if ANIM_BED - #if BOTH(HAS_LEVELING, STATUS_ALT_BED_BITMAP) + #if ALL(HAS_LEVELING, STATUS_ALT_BED_BITMAP) #define BED_BITMAP(S) ((S) \ ? (planner.leveling_active ? status_bed_leveled_on_bmp : status_bed_on_bmp) \ : (planner.leveling_active ? status_bed_leveled_bmp : status_bed_bmp)) @@ -759,7 +759,7 @@ void MarlinUI::draw_status_screen() { // XYZ Coordinates // - #if EITHER(XYZ_NO_FRAME, XYZ_HOLLOW_FRAME) + #if ANY(XYZ_NO_FRAME, XYZ_HOLLOW_FRAME) #define XYZ_FRAME_TOP 29 #define XYZ_FRAME_HEIGHT INFO_FONT_ASCENT + 3 #else @@ -868,7 +868,7 @@ void MarlinUI::draw_status_screen() { if (PAGE_CONTAINS(STATUS_BASELINE - INFO_FONT_ASCENT, STATUS_BASELINE + INFO_FONT_DESCENT)) { lcd_moveto(0, STATUS_BASELINE); - #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT) // Alternate Status message and Filament display if (ELAPSED(millis(), next_filament_display)) { lcd_put_u8str(F(LCD_STR_FILAM_DIA)); diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 8eda8ca4477c..0dadfe24db94 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -76,7 +76,7 @@ #include "../../../module/probe.h" #endif -#if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) +#if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) #include "../../../feature/babystep.h" #endif @@ -214,7 +214,7 @@ void HMI_SetLanguageCache() { } void HMI_SetLanguage() { - #if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) + #if ALL(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) BL24CXX::read(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language)); #endif HMI_SetLanguageCache(); @@ -223,7 +223,7 @@ void HMI_SetLanguage() { void HMI_ToggleLanguage() { HMI_flag.language = HMI_IsChinese() ? DWIN_ENGLISH : DWIN_CHINESE; HMI_SetLanguageCache(); - #if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) + #if ALL(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) BL24CXX::write(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language)); #endif } @@ -488,7 +488,7 @@ void Draw_Back_First(const bool is_sel=true) { #define PREPARE_CASE_ZOFF (PREPARE_CASE_HOME + ENABLED(HAS_ZOFFSET_ITEM)) #define PREPARE_CASE_PLA (PREPARE_CASE_ZOFF + ENABLED(HAS_PREHEAT)) #define PREPARE_CASE_ABS (PREPARE_CASE_PLA + (TERN0(HAS_PREHEAT, PREHEAT_COUNT > 1))) -#define PREPARE_CASE_COOL (PREPARE_CASE_ABS + EITHER(HAS_HOTEND, HAS_HEATED_BED)) +#define PREPARE_CASE_COOL (PREPARE_CASE_ABS + ANY(HAS_HOTEND, HAS_HEATED_BED)) #define PREPARE_CASE_LANG (PREPARE_CASE_COOL + 1) #define PREPARE_CASE_TOTAL PREPARE_CASE_LANG @@ -1388,7 +1388,7 @@ void HMI_Move_Z() { LIMIT(HMI_ValueStruct.offset_value, (Z_PROBE_OFFSET_RANGE_MIN) * 100, (Z_PROBE_OFFSET_RANGE_MAX) * 100); last_zoffset = dwin_zoffset; dwin_zoffset = HMI_ValueStruct.offset_value / 100.0f; - #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) + #if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) if (BABYSTEP_ALLOWED()) babystep.add_mm(Z_AXIS, dwin_zoffset - last_zoffset); #endif Draw_Edit_Signed_Float2(zoff_line, HMI_ValueStruct.offset_value, true); @@ -2308,10 +2308,10 @@ void HMI_Printing() { char cmd[40]; cmd[0] = '\0'; - #if BOTH(HAS_HEATED_BED, PAUSE_HEAT) + #if ALL(HAS_HEATED_BED, PAUSE_HEAT) if (resume_bed_temp) sprintf_P(cmd, PSTR("M190 S%i\n"), resume_bed_temp); #endif - #if BOTH(HAS_HOTEND, PAUSE_HEAT) + #if ALL(HAS_HOTEND, PAUSE_HEAT) if (resume_hotend_temp) sprintf_P(&cmd[strlen(cmd)], PSTR("M109 S%i\n"), resume_hotend_temp); #endif @@ -2718,7 +2718,7 @@ void HMI_Prepare() { #if HAS_ZOFFSET_ITEM case PREPARE_CASE_ZOFF: - #if EITHER(HAS_BED_PROBE, BABYSTEPPING) + #if ANY(HAS_BED_PROBE, BABYSTEPPING) checkkey = Homeoffset; HMI_ValueStruct.show_mode = -4; HMI_ValueStruct.offset_value = BABY_Z_VAR * 100; @@ -3797,7 +3797,7 @@ void HMI_Tune() { #endif #if HAS_ZOFFSET_ITEM case TUNE_CASE_ZOFF: // Z-offset - #if EITHER(HAS_BED_PROBE, BABYSTEPPING) + #if ANY(HAS_BED_PROBE, BABYSTEPPING) checkkey = Homeoffset; HMI_ValueStruct.offset_value = BABY_Z_VAR * 100; Draw_Edit_Signed_Float2(TUNE_CASE_ZOFF + MROWS - index_tune, HMI_ValueStruct.offset_value, true); @@ -4257,7 +4257,7 @@ void DWIN_HandleScreen() { case Extruder: HMI_Move_E(); break; case ETemp: HMI_ETemp(); break; #endif - #if EITHER(HAS_BED_PROBE, BABYSTEPPING) + #if ANY(HAS_BED_PROBE, BABYSTEPPING) case Homeoffset: HMI_Zoffset(); break; #endif #if HAS_HEATED_BED diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index 34985a54cbbf..f61dbb93bd1f 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -1107,7 +1107,7 @@ void CrealityDWINClass::Menu_Item_Handler(const uint8_t menu, const uint8_t item #define PREPARE_MANUALLEVEL (PREPARE_HOME + 1) #define PREPARE_ZOFFSET (PREPARE_MANUALLEVEL + ENABLED(HAS_ZOFFSET_ITEM)) #define PREPARE_PREHEAT (PREPARE_ZOFFSET + ENABLED(HAS_PREHEAT)) - #define PREPARE_COOLDOWN (PREPARE_PREHEAT + EITHER(HAS_HOTEND, HAS_HEATED_BED)) + #define PREPARE_COOLDOWN (PREPARE_PREHEAT + ANY(HAS_HOTEND, HAS_HEATED_BED)) #define PREPARE_CHANGEFIL (PREPARE_COOLDOWN + ENABLED(ADVANCED_PAUSE_FEATURE)) #define PREPARE_CUSTOM_MENU (PREPARE_CHANGEFIL + ENABLED(HAS_CUSTOM_MENU)) #define PREPARE_TOTAL PREPARE_CUSTOM_MENU @@ -3060,7 +3060,7 @@ void CrealityDWINClass::Menu_Item_Handler(const uint8_t menu, const uint8_t item #define LEVELING_BACK 0 #define LEVELING_ACTIVE (LEVELING_BACK + 1) - #define LEVELING_GET_TILT (LEVELING_ACTIVE + BOTH(HAS_BED_PROBE, AUTO_BED_LEVELING_UBL)) + #define LEVELING_GET_TILT (LEVELING_ACTIVE + ALL(HAS_BED_PROBE, AUTO_BED_LEVELING_UBL)) #define LEVELING_GET_MESH (LEVELING_GET_TILT + 1) #define LEVELING_MANUAL (LEVELING_GET_MESH + 1) #define LEVELING_VIEW (LEVELING_MANUAL + 1) @@ -3095,7 +3095,7 @@ void CrealityDWINClass::Menu_Item_Handler(const uint8_t menu, const uint8_t item Draw_Checkbox(row, planner.leveling_active); } break; - #if BOTH(HAS_BED_PROBE, AUTO_BED_LEVELING_UBL) + #if ALL(HAS_BED_PROBE, AUTO_BED_LEVELING_UBL) case LEVELING_GET_TILT: if (draw) Draw_Menu_Item(row, ICON_Tilt, F("Autotilt Current Mesh")); diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp index e822371c0df1..fd837c60b687 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp @@ -565,7 +565,7 @@ void MarlinUI::draw_status_message(const bool blink) { #endif // AUTO_BED_LEVELING_UBL - #if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) + #if ANY(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) void MarlinUI::zoffset_overlay(const int8_t dir) { const int rot_up = TERN(OVERLAY_GFX_REVERSE, ICON_RotateCCW, ICON_RotateCW), diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp index 5ec94b853f10..800787cddc10 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp @@ -192,7 +192,7 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const uint16_t x #endif celsius_float_t tc = 0, tt = 0; - bool isBed = (DISABLED(HAS_HOTEND) && ENABLED(HAS_HEATED_BED)) || (BOTH(HAS_HOTEND, HAS_HEATED_BED) && heater < 0), + bool isBed = (DISABLED(HAS_HOTEND) && ENABLED(HAS_HEATED_BED)) || (ALL(HAS_HOTEND, HAS_HEATED_BED) && heater < 0), ta = false, c_draw, t_draw, i_draw; c_draw = t_draw = i_draw = !ui.did_first_redraw; if (isBed) { diff --git a/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp b/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp index 47b104c5ba47..48e07cc20793 100644 --- a/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp +++ b/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp @@ -46,7 +46,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(DWIN_LCD_PROUI, HAS_LEVELING) +#if ALL(DWIN_LCD_PROUI, HAS_LEVELING) #include "../../marlinui.h" #include "../../../core/types.h" diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 4a332f973e20..8b956fbe72c4 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -346,7 +346,7 @@ void HMI_SetLanguageCache() { } void HMI_SetLanguage() { - #if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) + #if ALL(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) BL24CXX::read(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language)); #endif HMI_SetLanguageCache(); @@ -355,7 +355,7 @@ void HMI_SetLanguage() { void HMI_ToggleLanguage() { HMI_flag.language = HMI_IsChinese() ? DWIN_ENGLISH : DWIN_CHINESE; HMI_SetLanguageCache(); - #if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) + #if ALL(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) BL24CXX::write(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language)); #endif } @@ -1468,7 +1468,7 @@ void DWIN_LevelingStart() { HMI_SaveProcessID(Leveling); Title.ShowCaption(GET_TEXT_F(MSG_BED_LEVELING)); DWIN_Show_Popup(ICON_AutoLeveling, GET_TEXT_F(MSG_BED_LEVELING), GET_TEXT_F(MSG_PLEASE_WAIT)); - #if BOTH(AUTO_BED_LEVELING_UBL, PREHEAT_BEFORE_LEVELING) + #if ALL(AUTO_BED_LEVELING_UBL, PREHEAT_BEFORE_LEVELING) #if HAS_HOTEND if (thermalManager.degTargetHotend(0) < LEVELING_NOZZLE_TEMP) thermalManager.setTargetHotend(LEVELING_NOZZLE_TEMP, 0); @@ -1527,7 +1527,7 @@ void DWIN_LevelingDone() { } #endif -#if EITHER(PIDTEMP, PIDTEMPBED) +#if ANY(PIDTEMP, PIDTEMPBED) void DWIN_PidTuning(pidresult_t result) { HMI_value.pidresult = result; @@ -1676,10 +1676,10 @@ void DWIN_SetDataDefaults() { TERN_(BAUD_RATE_GCODE, SetBaud250K()); HMI_data.FullManualTramming = false; HMI_data.MediaAutoMount = ENABLED(HAS_SD_EXTENDER); - #if BOTH(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) + #if ALL(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) HMI_data.z_after_homing = DEF_Z_AFTER_HOMING; #endif - #if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS) + #if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS) TERN_(LED_COLOR_PRESETS, leds.set_default()); ApplyLEDColor(); #endif @@ -1699,7 +1699,7 @@ void DWIN_CopySettingsFrom(const char * const buff) { TERN_(PREVENT_COLD_EXTRUSION, ApplyExtMinT()); feedrate_percentage = 100; TERN_(BAUD_RATE_GCODE, HMI_SetBaudRate()); - #if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS) + #if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS) leds.set_color( HMI_data.Led_Color.r, HMI_data.Led_Color.g, @@ -1961,7 +1961,7 @@ void AutoHome() { queue.inject_P(G28_STR); } void HomeX() { queue.inject(F("G28X")); } void HomeY() { queue.inject(F("G28Y")); } void HomeZ() { queue.inject(F("G28Z")); } - #if BOTH(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) + #if ALL(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) void ApplyZAfterHoming() { HMI_data.z_after_homing = MenuData.Value; }; void SetZAfterHoming() { SetIntOnClick(0, 20, HMI_data.z_after_homing, ApplyZAfterHoming); } #endif @@ -1979,14 +1979,14 @@ void AutoHome() { queue.inject_P(G28_STR); } void ApplyZOffset() { TERN_(EEPROM_SETTINGS, settings.save()); } void LiveZOffset() { - #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) + #if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) const_float_t step_zoffset = round((MenuData.Value / 100.0f) * planner.settings.axis_steps_per_mm[Z_AXIS]) - babystep.accum; if (BABYSTEP_ALLOWED()) babystep.add_steps(Z_AXIS, step_zoffset); //DEBUG_ECHOLNF(F("BB Steps: "), step_zoffset); #endif } void SetZOffset() { - #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) + #if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) babystep.accum = round(planner.settings.axis_steps_per_mm[Z_AXIS] * BABY_Z_VAR); #endif SetPFloatOnClick(Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX, 2, ApplyZOffset, LiveZOffset); @@ -2057,7 +2057,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS } #endif -#if EITHER(PIDTEMP, PIDTEMPBED) +#if ANY(PIDTEMP, PIDTEMPBED) void SetPID(celsius_t t, heater_id_t h) { char cmd[53] = ""; char str_1[5] = "", str_2[5] = ""; @@ -2114,7 +2114,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS #endif #if ENABLED(LED_CONTROL_MENU) - #if !BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL) + #if !ALL(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL) void SetLedStatus() { leds.toggle(); Show_Chkb_Line(leds.lights_on); @@ -2523,7 +2523,7 @@ void SetStepsZ() { HMI_value.axis = Z_AXIS, SetPFloatOnClick( MIN_STEP, MAX_STEP void SetBedPidT() { SetPIntOnClick(MIN_BEDTEMP, MAX_BEDTEMP); } #endif -#if EITHER(PIDTEMP, PIDTEMPBED) +#if ANY(PIDTEMP, PIDTEMPBED) void SetPidCycles() { SetPIntOnClick(3, 50); } void SetKp() { SetPFloatOnClick(0, 1000, 2); } void ApplyPIDi() { @@ -2632,7 +2632,7 @@ void onDrawAutoHome(MenuItemClass* menuitem, int8_t line) { } #if HAS_ZOFFSET_ITEM - #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) + #if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) void onDrawZOffset(MenuItemClass* menuitem, int8_t line) { if (HMI_IsChinese()) menuitem->SetFrame(1, 174, 164, 223, 177); onDrawPFloat2Menu(menuitem, line); @@ -2694,7 +2694,7 @@ void onDrawGetColorItem(MenuItemClass* menuitem, int8_t line) { DWIN_Draw_HLine(HMI_data.SplitLine_Color, 16, MYPOS(line + 1), 240); } -#if EITHER(PIDTEMP, PIDTEMPBED) +#if ANY(PIDTEMP, PIDTEMPBED) void onDrawPIDi(MenuItemClass* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 2, unscalePID_i(*(float*)static_cast(menuitem)->value)); } void onDrawPIDd(MenuItemClass* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 2, unscalePID_d(*(float*)static_cast(menuitem)->value)); } #endif @@ -3207,7 +3207,7 @@ void Draw_GetColor_Menu() { DWIN_Draw_Rectangle(1, *MenuData.P_Int, 20, 315, DWIN_WIDTH - 20, 335); } -#if BOTH(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS) +#if ALL(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS) void Draw_CaseLight_Menu() { checkkey = Menu; @@ -3227,7 +3227,7 @@ void Draw_GetColor_Menu() { checkkey = Menu; if (SET_MENU(LedControlMenu, MSG_LED_CONTROL, 10)) { BACK_ITEM(Draw_Control_Menu); - #if !BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL) + #if !ALL(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL) EDIT_ITEM(ICON_LedControl, MSG_LEDS, onDrawChkbMenu, SetLedStatus, &leds.lights_on); #endif #if HAS_COLOR_LEDS diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index 4658e717794f..6bf28a938cad 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -35,7 +35,7 @@ #include "../common/encoder.h" #include "../../../libs/BL24CXX.h" -#if EITHER(BABYSTEPPING, HAS_BED_PROBE) +#if ANY(BABYSTEPPING, HAS_BED_PROBE) #define HAS_ZOFFSET_ITEM 1 #if !HAS_BED_PROBE #define JUST_BABYSTEP 1 @@ -128,10 +128,10 @@ typedef struct { bool FullManualTramming = false; bool MediaAutoMount = ENABLED(HAS_SD_EXTENDER); - #if BOTH(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) + #if ALL(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) uint8_t z_after_homing = DEF_Z_AFTER_HOMING; #endif - #if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS) + #if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS) LEDColor Led_Color = Def_Leds_Color; #endif } HMI_data_t; @@ -211,7 +211,7 @@ void ParkHead(); #if HAS_ONESTEP_LEVELING void Trammingwizard(); #endif -#if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS) +#if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS) void ApplyLEDColor(); #endif #if ENABLED(AUTO_BED_LEVELING_UBL) @@ -319,7 +319,7 @@ void Draw_FilSet_Menu(); void Draw_PhySet_Menu(); void Draw_SelectColors_Menu(); void Draw_GetColor_Menu(); -#if BOTH(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS) +#if ALL(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS) void Draw_CaseLight_Menu(); #endif #if ENABLED(LED_CONTROL_MENU) @@ -340,7 +340,7 @@ void Draw_MaxAccel_Menu(); void Draw_MaxJerk_Menu(); #endif void Draw_Steps_Menu(); -#if EITHER(HAS_BED_PROBE, BABYSTEPPING) +#if ANY(HAS_BED_PROBE, BABYSTEPPING) void Draw_ZOffsetWiz_Menu(); #endif #if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU) diff --git a/Marlin/src/lcd/e3v2/proui/dwin_defines.h b/Marlin/src/lcd/e3v2/proui/dwin_defines.h index de3f40e2814b..8031ca86e8c3 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin_defines.h +++ b/Marlin/src/lcd/e3v2/proui/dwin_defines.h @@ -66,7 +66,7 @@ #define Def_Indicator_Color Color_White #define Def_Coordinate_Color Color_White #define Def_Button_Color RGB( 0, 23, 16) -#if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS) +#if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS) #define Def_Leds_Color LEDColorWhite() #endif #if ENABLED(CASELIGHT_USES_BRIGHTNESS) diff --git a/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp b/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp index 0945d6977814..14f3635fdb3e 100644 --- a/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp +++ b/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp @@ -29,7 +29,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(DWIN_LCD_PROUI, HAS_ESDIAG) +#if ALL(DWIN_LCD_PROUI, HAS_ESDIAG) #include "endstop_diag.h" diff --git a/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp b/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp index 6411b669bbc8..850bec60b08a 100644 --- a/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp +++ b/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp @@ -44,7 +44,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(DWIN_LCD_PROUI, HAS_GCODE_PREVIEW) +#if ALL(DWIN_LCD_PROUI, HAS_GCODE_PREVIEW) #include "../../../core/types.h" #include "../../marlinui.h" diff --git a/Marlin/src/lcd/e3v2/proui/lockscreen.cpp b/Marlin/src/lcd/e3v2/proui/lockscreen.cpp index 85f35582b268..abf67ad9aff4 100644 --- a/Marlin/src/lcd/e3v2/proui/lockscreen.cpp +++ b/Marlin/src/lcd/e3v2/proui/lockscreen.cpp @@ -29,7 +29,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(DWIN_LCD_PROUI, HAS_LOCKSCREEN) +#if ALL(DWIN_LCD_PROUI, HAS_LOCKSCREEN) #include "dwin_defines.h" #include "dwinui.h" diff --git a/Marlin/src/lcd/e3v2/proui/meshviewer.cpp b/Marlin/src/lcd/e3v2/proui/meshviewer.cpp index 18cdffd00d62..56e94d204966 100644 --- a/Marlin/src/lcd/e3v2/proui/meshviewer.cpp +++ b/Marlin/src/lcd/e3v2/proui/meshviewer.cpp @@ -29,7 +29,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(DWIN_LCD_PROUI, HAS_MESH) +#if ALL(DWIN_LCD_PROUI, HAS_MESH) #include "../../../core/types.h" #include "../../marlinui.h" diff --git a/Marlin/src/lcd/e3v2/proui/plot.cpp b/Marlin/src/lcd/e3v2/proui/plot.cpp index 75917320a45f..bb93ca565306 100644 --- a/Marlin/src/lcd/e3v2/proui/plot.cpp +++ b/Marlin/src/lcd/e3v2/proui/plot.cpp @@ -44,7 +44,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(DWIN_LCD_PROUI, HAS_PIDPLOT) +#if ALL(DWIN_LCD_PROUI, HAS_PIDPLOT) #include "plot.h" #include "../../../core/types.h" diff --git a/Marlin/src/lcd/e3v2/proui/printstats.cpp b/Marlin/src/lcd/e3v2/proui/printstats.cpp index 638cd3420809..7f45fa71ef1b 100644 --- a/Marlin/src/lcd/e3v2/proui/printstats.cpp +++ b/Marlin/src/lcd/e3v2/proui/printstats.cpp @@ -29,7 +29,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(DWIN_LCD_PROUI, PRINTCOUNTER) +#if ALL(DWIN_LCD_PROUI, PRINTCOUNTER) #include "printstats.h" diff --git a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp index 03997fa95bea..53e9f9b04a3b 100644 --- a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp +++ b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp @@ -92,7 +92,7 @@ void AnycubicTFTClass::OnSetup() { delay_ms(10); // Init the state of the key pins running on the TFT - #if BOTH(SDSUPPORT, HAS_SD_DETECT) + #if ALL(SDSUPPORT, HAS_SD_DETECT) SET_INPUT_PULLUP(SD_DETECT_PIN); #endif #if ENABLED(FILAMENT_RUNOUT_SENSOR) @@ -922,7 +922,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { } void AnycubicTFTClass::DoSDCardStateCheck() { - #if BOTH(SDSUPPORT, HAS_SD_DETECT) + #if ALL(SDSUPPORT, HAS_SD_DETECT) bool isInserted = isMediaInserted(); if (isInserted) SENDLINE_DBG_PGM("J00", "TFT Serial Debug: SD card state changed... isInserted"); diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index 36ab016b35a6..20f7dbb0d445 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -651,7 +651,7 @@ void DGUSScreenHandlerMKS::ManualAssistLeveling(DGUS_VP_Variable &var, void *val #define mks_min(a, b) ((a) < (b)) ? (a) : (b) #define mks_max(a, b) ((a) > (b)) ? (a) : (b) void DGUSScreenHandlerMKS::TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr) { - #if EITHER(HAS_TRINAMIC_CONFIG, HAS_STEALTHCHOP) + #if ANY(HAS_TRINAMIC_CONFIG, HAS_STEALTHCHOP) const uint16_t tmc_value = BE16_P(val_ptr); #endif @@ -1181,7 +1181,7 @@ void DGUSScreenHandlerMKS::GetManualFilamentSpeed(DGUS_VP_Variable &var, void *v } void DGUSScreenHandlerMKS::FilamentLoadUnload(DGUS_VP_Variable &var, void *val_ptr, const int filamentDir) { - #if EITHER(HAS_MULTI_HOTEND, SINGLENOZZLE) + #if ANY(HAS_MULTI_HOTEND, SINGLENOZZLE) uint8_t swap_tool = 0; #else constexpr uint8_t swap_tool = 1; // T0 (or none at all) @@ -1202,7 +1202,7 @@ void DGUSScreenHandlerMKS::FilamentLoadUnload(DGUS_VP_Variable &var, void *val_p if (thermalManager.tooColdToExtrude(0)) hotend_too_cold = 1; else { - #if EITHER(HAS_MULTI_HOTEND, SINGLENOZZLE) + #if ANY(HAS_MULTI_HOTEND, SINGLENOZZLE) swap_tool = 1; #endif } @@ -1217,7 +1217,7 @@ void DGUSScreenHandlerMKS::FilamentLoadUnload(DGUS_VP_Variable &var, void *val_p break; } - #if BOTH(HAS_HOTEND, PREVENT_COLD_EXTRUSION) + #if ALL(HAS_HOTEND, PREVENT_COLD_EXTRUSION) if (hotend_too_cold) { if (thermalManager.targetTooColdToExtrude(hotend_too_cold - 1)) thermalManager.setTargetHotend(thermalManager.extrude_min_temp, hotend_too_cold - 1); sendinfoscreen(F("NOTICE"), nullptr, F("Please wait."), F("Nozzle heating!"), true, true, true, true); @@ -1229,7 +1229,7 @@ void DGUSScreenHandlerMKS::FilamentLoadUnload(DGUS_VP_Variable &var, void *val_p if (swap_tool) { char buf[30]; snprintf_P(buf, 30 - #if EITHER(HAS_MULTI_HOTEND, SINGLENOZZLE) + #if ANY(HAS_MULTI_HOTEND, SINGLENOZZLE) , PSTR("M1002T%cE%dF%d"), char('0' + swap_tool - 1) #else , PSTR("M1002E%dF%d") @@ -1245,7 +1245,7 @@ void DGUSScreenHandlerMKS::FilamentLoadUnload(DGUS_VP_Variable &var, void *val_p * within the G-code execution window for best concurrency. */ void GcodeSuite::M1002() { - #if EITHER(HAS_MULTI_HOTEND, SINGLENOZZLE) + #if ANY(HAS_MULTI_HOTEND, SINGLENOZZLE) { char buf[3]; sprintf_P(buf, PSTR("T%c"), char('0' + parser.intval('T'))); diff --git a/Marlin/src/lcd/extui/example/example.cpp b/Marlin/src/lcd/extui/example/example.cpp index 6ef20cf5f0f3..e00b84a28a58 100644 --- a/Marlin/src/lcd/extui/example/example.cpp +++ b/Marlin/src/lcd/extui/example/example.cpp @@ -21,7 +21,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(EXTUI_EXAMPLE, EXTENSIBLE_UI) +#if ALL(EXTUI_EXAMPLE, EXTENSIBLE_UI) #include "../ui_api.h" diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp index be18c0348388..fa31ce155332 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp @@ -25,7 +25,7 @@ #if ENABLED(COCOA_LEVELING_MENU) -#if BOTH(HAS_BED_PROBE, BLTOUCH) +#if ALL(HAS_BED_PROBE, BLTOUCH) #include "../../../../feature/bltouch.h" #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp index ee299a7f64d6..2f231278f2d8 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp @@ -57,7 +57,7 @@ void MainMenu::onRedraw(draw_mode_t what) { .font(Theme::font_medium) .tag( 2).button(MOVE_XYZ_POS, GET_TEXT_F(MSG_XYZ_MOVE)) .tag( 3).button(TEMPERATURE_POS, GET_TEXT_F(MSG_TEMPERATURE)) - .enabled(BOTH(HAS_LEVELING, HAS_BED_PROBE)) + .enabled(ALL(HAS_LEVELING, HAS_BED_PROBE)) .tag( 4).button(ZPROBE_ZOFFSET_POS, GET_TEXT_F(MSG_ZPROBE_ZOFFSET)) .tag( 5).button(MOVE_E_POS, GET_TEXT_F(MSG_E_MOVE)) .tag( 6).button(SPEED_POS, GET_TEXT_F(MSG_PRINT_SPEED)) @@ -79,7 +79,7 @@ bool MainMenu::onTouchEnd(uint8_t tag) { case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; case 2: GOTO_SCREEN(MoveXYZScreen); break; case 3: GOTO_SCREEN(TemperatureScreen); break; - #if BOTH(HAS_LEVELING, HAS_BED_PROBE) + #if ALL(HAS_LEVELING, HAS_BED_PROBE) case 4: GOTO_SCREEN(ZOffsetScreen); break; #endif case 5: GOTO_SCREEN(MoveEScreen); break; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp index 662753a1547c..a796c8edcf5f 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp @@ -1208,7 +1208,7 @@ void CLCD::default_display_orientation() { + ENABLED(TOUCH_UI_INVERTED) * 1 ); cmd.execute(); - #elif EITHER(TOUCH_UI_PORTRAIT, TOUCH_UI_MIRRORED) + #elif ANY(TOUCH_UI_PORTRAIT, TOUCH_UI_MIRRORED) #error "PORTRAIT or MIRRORED orientation not supported on the FT800." #elif ENABLED(TOUCH_UI_INVERTED) mem_write_32(REG::ROTATE, 1); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.cpp index 0e251f7bb1c7..b229154e82a4 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.cpp @@ -21,7 +21,7 @@ #include "../ftdi_extended.h" -#if BOTH(FTDI_EXTENDED, TOUCH_UI_USE_UTF8) +#if ALL(FTDI_EXTENDED, TOUCH_UI_USE_UTF8) namespace FTDI { // Returns the height of a standard FTDI romfont diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.cpp index d12bf9711907..5171ee508aff 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.cpp @@ -21,7 +21,7 @@ #include "../ftdi_extended.h" -#if BOTH(FTDI_EXTENDED, TOUCH_UI_USE_UTF8) +#if ALL(FTDI_EXTENDED, TOUCH_UI_USE_UTF8) constexpr static uint8_t std_font = 31; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp index 6f189155f5de..d7f4d31bdc12 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp @@ -21,7 +21,7 @@ #include "../ftdi_extended.h" -#if BOTH(FTDI_EXTENDED, TOUCH_UI_USE_UTF8) +#if ALL(FTDI_EXTENDED, TOUCH_UI_USE_UTF8) using namespace FTDI; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp index 43e5c333651a..698f0d47b794 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp @@ -76,7 +76,7 @@ void AboutScreen::onRedraw(draw_mode_t) { #endif , OPT_CENTER, font_xlarge ); - #if BOTH(TOUCH_UI_DEVELOPER_MENU, FTDI_DEVELOPER_MENU) + #if ALL(TOUCH_UI_DEVELOPER_MENU, FTDI_DEVELOPER_MENU) cmd.tag(3); #endif draw_text_box(cmd, FW_VERS_POS, @@ -91,7 +91,7 @@ void AboutScreen::onRedraw(draw_mode_t) { draw_text_box(cmd, LICENSE_POS, GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny); cmd.font(font_medium); - #if BOTH(PRINTCOUNTER, FTDI_STATISTICS_SCREEN) + #if ALL(PRINTCOUNTER, FTDI_STATISTICS_SCREEN) cmd.colors(normal_btn) .tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU)); #endif @@ -102,10 +102,10 @@ void AboutScreen::onRedraw(draw_mode_t) { bool AboutScreen::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); break; - #if BOTH(PRINTCOUNTER, FTDI_STATISTICS_SCREEN) + #if ALL(PRINTCOUNTER, FTDI_STATISTICS_SCREEN) case 2: GOTO_SCREEN(StatisticsScreen); break; #endif - #if BOTH(TOUCH_UI_DEVELOPER_MENU, FTDI_DEVELOPER_MENU) + #if ALL(TOUCH_UI_DEVELOPER_MENU, FTDI_DEVELOPER_MENU) case 3: GOTO_SCREEN(DeveloperMenu); break; #endif default: return false; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp index 8753b44e709b..4745ff99dc55 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp @@ -37,7 +37,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { } #if ENABLED(TOUCH_UI_PORTRAIT) - #if EITHER(HAS_MULTI_HOTEND, SENSORLESS_HOMING) + #if ANY(HAS_MULTI_HOTEND, SENSORLESS_HOMING) #define GRID_ROWS 9 #else #define GRID_ROWS 8 @@ -58,7 +58,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { #define BACKLASH_POS BTN_POS(2,7), BTN_SIZE(1,1) #define OFFSETS_POS BTN_POS(1,8), BTN_SIZE(1,1) #define TMC_HOMING_THRS_POS BTN_POS(2,8), BTN_SIZE(1,1) - #if EITHER(HAS_MULTI_HOTEND, SENSORLESS_HOMING) + #if ANY(HAS_MULTI_HOTEND, SENSORLESS_HOMING) #define BACK_POS BTN_POS(1,9), BTN_SIZE(2,1) #else #define BACK_POS BTN_POS(1,8), BTN_SIZE(2,1) @@ -99,7 +99,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { .tag(14).button(TMC_HOMING_THRS_POS, GET_TEXT_F(MSG_TMC_HOMING_THRS)) .enabled(ENABLED(HAS_MULTI_HOTEND)) .tag(4) .button(OFFSETS_POS, GET_TEXT_F(MSG_OFFSETS_MENU)) - .enabled(EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)) + .enabled(ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)) .tag(11).button(FILAMENT_POS, GET_TEXT_F(MSG_FILAMENT)) .tag(12).button(ENDSTOPS_POS, GET_TEXT_F(MSG_LCD_ENDSTOPS)) .tag(15).button(DISPLAY_POS, GET_TEXT_F(MSG_DISPLAY_MENU)) @@ -133,7 +133,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { #endif case 9: GOTO_SCREEN(InterfaceSettingsScreen); LockScreen::check_passcode(); break; case 10: GOTO_SCREEN(RestoreFailsafeDialogBox); LockScreen::check_passcode(); break; - #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) + #if ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) case 11: GOTO_SCREEN(FilamentMenu); break; #endif case 12: GOTO_SCREEN(EndstopStatesScreen); break; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp index f7e57cf0b9a0..08301d41cf49 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp @@ -89,7 +89,7 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) { #else PIN_DISABLED(1, 4, GET_TEXT_F(MSG_RUNOUT_1), FIL_RUNOUT) #endif - #if BOTH(HAS_MULTI_EXTRUDER, FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FIL_RUNOUT2) + #if ALL(HAS_MULTI_EXTRUDER, FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FIL_RUNOUT2) PIN_ENABLED (3, 4, GET_TEXT_F(MSG_RUNOUT_2), FIL_RUNOUT2, FIL_RUNOUT2_STATE) #else PIN_DISABLED(3, 4, GET_TEXT_F(MSG_RUNOUT_2), FIL_RUNOUT2) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp index 2fb9d18498c0..47540b0f5519 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp @@ -25,7 +25,7 @@ #ifdef FTDI_LEVELING_MENU -#if BOTH(HAS_BED_PROBE,BLTOUCH) +#if ALL(HAS_BED_PROBE,BLTOUCH) #include "../../../../feature/bltouch.h" #endif @@ -81,7 +81,7 @@ void LevelingMenu::onRedraw(draw_mode_t what) { .text(BLTOUCH_TITLE_POS, GET_TEXT_F(MSG_BLTOUCH)) #endif .font(font_medium).colors(normal_btn) - .enabled(EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION)) + .enabled(ANY(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION)) .tag(2).button(LEVEL_AXIS_POS, GET_TEXT_F(MSG_LEVEL_X_AXIS)) .enabled(ENABLED(HAS_BED_PROBE)) .tag(3).button(PROBE_BED_POS, GET_TEXT_F(MSG_PROBE_BED)) @@ -103,7 +103,7 @@ void LevelingMenu::onRedraw(draw_mode_t what) { bool LevelingMenu::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); break; - #if EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION) + #if ANY(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION) case 2: SpinnerDialogBox::enqueueAndWait(F("G34")); break; #endif #if HAS_BED_PROBE diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h index b88e51757690..0aef60bd7e88 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h @@ -74,7 +74,7 @@ enum { #if ENABLED(CASE_LIGHT_ENABLE) CASE_LIGHT_SCREEN_CACHE, #endif - #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) + #if ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) FILAMENT_MENU_CACHE, #endif #if ENABLED(LIN_ADVANCE) @@ -192,7 +192,7 @@ enum { #include "case_light_screen.h" #endif -#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) +#if ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) #include "filament_menu.h" #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp index 0370c4417478..259f6d5b89ef 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp @@ -74,11 +74,11 @@ void TuneMenu::onRedraw(draw_mode_t what) { .tag(2).button(TEMPERATURE_POS, GET_TEXT_F(MSG_TEMPERATURE)) .enabled(!sdOrHostPrinting || sdOrHostPaused) .tag(3).button(FIL_CHANGE_POS, GET_TEXT_F(MSG_FILAMENTCHANGE)) - .enabled(EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)) + .enabled(ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)) .tag(9).button(FILAMENT_POS, GET_TEXT_F(MSG_FILAMENT)) #if ENABLED(BABYSTEPPING) && HAS_MULTI_HOTEND .tag(4).button(NUDGE_NOZ_POS, GET_TEXT_F(MSG_NUDGE_NOZZLE)) - #elif BOTH(HAS_LEVELING, HAS_BED_PROBE) + #elif ALL(HAS_LEVELING, HAS_BED_PROBE) .tag(4).button(NUDGE_NOZ_POS, GET_TEXT_F(MSG_ZPROBE_ZOFFSET)) #endif .tag(5).button(SPEED_POS, GET_TEXT_F(MSG_PRINT_SPEED)) @@ -105,7 +105,7 @@ bool TuneMenu::onTouchEnd(uint8_t tag) { case 4: #if ENABLED(BABYSTEPPING) && HAS_MULTI_HOTEND GOTO_SCREEN(NudgeNozzleScreen); - #elif BOTH(HAS_LEVELING, HAS_BED_PROBE) + #elif ALL(HAS_LEVELING, HAS_BED_PROBE) GOTO_SCREEN(ZOffsetScreen); #endif break; @@ -117,7 +117,7 @@ bool TuneMenu::onTouchEnd(uint8_t tag) { current_screen.forget(); PUSH_SCREEN(StatusScreen); break; - #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) + #if ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) case 9: GOTO_SCREEN(FilamentMenu); break; #endif #if ENABLED(CASE_LIGHT_ENABLE) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/colors.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/colors.h index 70c2be4ec23f..0e145e39f208 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/colors.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/colors.h @@ -37,7 +37,7 @@ namespace Theme { #else // Use linear accent colors - #if EITHER(TOUCH_UI_ROYAL_THEME, TOUCH_UI_FROZEN_THEME) + #if ANY(TOUCH_UI_ROYAL_THEME, TOUCH_UI_FROZEN_THEME) // Dark blue accent colors constexpr int accent_hue = 216; constexpr float accent_sat = 0.7; @@ -88,7 +88,7 @@ namespace Theme { constexpr uint32_t bed_mesh_lines_rgb = 0xFFFFFF; constexpr uint32_t bed_mesh_shadow_rgb = 0x444444; - #elif EITHER(TOUCH_UI_COCOA_THEME, TOUCH_UI_FROZEN_THEME) + #elif ANY(TOUCH_UI_COCOA_THEME, TOUCH_UI_FROZEN_THEME) constexpr uint32_t theme_darkest = accent_color_1; constexpr uint32_t theme_dark = accent_color_4; diff --git a/Marlin/src/lcd/extui/mks_ui/draw_auto_level_offset_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_auto_level_offset_settings.cpp index fd14585e7028..5a5d457b080b 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_auto_level_offset_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_auto_level_offset_settings.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(HAS_TFT_LVGL_UI, HAS_BED_PROBE) +#if ALL(HAS_TFT_LVGL_UI, HAS_BED_PROBE) #include "draw_ui.h" #include diff --git a/Marlin/src/lcd/extui/mks_ui/draw_cloud_bind.cpp b/Marlin/src/lcd/extui/mks_ui/draw_cloud_bind.cpp index 1dae0ebe2251..0798db1cc9f4 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_cloud_bind.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_cloud_bind.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) +#if ALL(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) #include "lv_conf.h" #include "draw_ui.h" diff --git a/Marlin/src/lcd/extui/mks_ui/draw_jerk_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_jerk_settings.cpp index a070cae15f4e..5b22103e8f2d 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_jerk_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_jerk_settings.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(HAS_TFT_LVGL_UI, HAS_CLASSIC_JERK) +#if ALL(HAS_TFT_LVGL_UI, HAS_CLASSIC_JERK) #include "draw_ui.h" #include diff --git a/Marlin/src/lcd/extui/mks_ui/draw_media_select.cpp b/Marlin/src/lcd/extui/mks_ui/draw_media_select.cpp index 81c82dc02dfa..085a008acde9 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_media_select.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_media_select.cpp @@ -21,7 +21,7 @@ */ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(HAS_TFT_LVGL_UI, MULTI_VOLUME) +#if ALL(HAS_TFT_LVGL_UI, MULTI_VOLUME) #include "draw_ui.h" #include diff --git a/Marlin/src/lcd/extui/mks_ui/draw_pause_message.cpp b/Marlin/src/lcd/extui/mks_ui/draw_pause_message.cpp index e5f6a5963a6b..b753a578012b 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_pause_message.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_pause_message.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(HAS_TFT_LVGL_UI, ADVANCED_PAUSE_FEATURE) +#if ALL(HAS_TFT_LVGL_UI, ADVANCED_PAUSE_FEATURE) #include "draw_ui.h" #include diff --git a/Marlin/src/lcd/extui/mks_ui/draw_tmc_current_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_tmc_current_settings.cpp index 9ec8f1501a0b..b243c88705a3 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_tmc_current_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_tmc_current_settings.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(HAS_TFT_LVGL_UI, HAS_TRINAMIC_CONFIG) +#if ALL(HAS_TFT_LVGL_UI, HAS_TRINAMIC_CONFIG) #include "draw_ui.h" #include diff --git a/Marlin/src/lcd/extui/mks_ui/draw_tmc_step_mode_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_tmc_step_mode_settings.cpp index 990cdda7e63b..d09c823b5979 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_tmc_step_mode_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_tmc_step_mode_settings.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(HAS_TFT_LVGL_UI, HAS_STEALTHCHOP) +#if ALL(HAS_TFT_LVGL_UI, HAS_STEALTHCHOP) #include "draw_ui.h" #include diff --git a/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp b/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp index a9a25db11822..74902a30ddc8 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(HAS_TFT_LVGL_UI, TOUCH_SCREEN_CALIBRATION) +#if ALL(HAS_TFT_LVGL_UI, TOUCH_SCREEN_CALIBRATION) #include "draw_ui.h" #include "draw_touch_calibration.h" diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp index b510e3c0c6f3..e9ebc0b55897 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp @@ -1377,7 +1377,7 @@ void LV_TASK_HANDLER() { if (TERN1(USE_SPI_DMA_TC, !get_lcd_dma_lock())) lv_task_handler(); - #if BOTH(MKS_TEST, SDSUPPORT) + #if ALL(MKS_TEST, SDSUPPORT) if (mks_test_flag == 0x1E) mks_hardware_test(); #endif diff --git a/Marlin/src/lcd/extui/mks_ui/draw_z_offset_wizard.cpp b/Marlin/src/lcd/extui/mks_ui/draw_z_offset_wizard.cpp index d143234fd53e..9adcebbc360a 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_z_offset_wizard.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_z_offset_wizard.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(HAS_TFT_LVGL_UI, PROBE_OFFSET_WIZARD) +#if ALL(HAS_TFT_LVGL_UI, PROBE_OFFSET_WIZARD) #include "draw_ui.h" #include diff --git a/Marlin/src/lcd/extui/mks_ui/irq_overrid.cpp b/Marlin/src/lcd/extui/mks_ui/irq_overrid.cpp index aca1db0039ba..b2615ac24b24 100644 --- a/Marlin/src/lcd/extui/mks_ui/irq_overrid.cpp +++ b/Marlin/src/lcd/extui/mks_ui/irq_overrid.cpp @@ -23,7 +23,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) +#if ALL(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) #include "tft_lvgl_configuration.h" diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp index 0c6315d43870..d72c206f61de 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp @@ -723,7 +723,7 @@ void disp_assets_update_progress(FSTR_P const fmsg) { #endif } -#if BOTH(MKS_TEST, SDSUPPORT) +#if ALL(MKS_TEST, SDSUPPORT) uint8_t mks_test_flag = 0; const char *MKSTestPath = "MKS_TEST"; void mks_test_get() { diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware.h b/Marlin/src/lcd/extui/mks_ui/mks_hardware.h index c0cdacd963f4..3f8d9bfca741 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware.h +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.h @@ -26,7 +26,7 @@ #include // Functions for MKS_TEST -#if BOTH(MKS_TEST, SDSUPPORT) +#if ALL(MKS_TEST, SDSUPPORT) void mks_hardware_test(); void mks_test_get(); void mks_gpio_test(); diff --git a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp index 9a8996330365..e3c61e6a05a5 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp @@ -50,7 +50,7 @@ XPT2046 touch; #include "../../../module/servo.h" #endif -#if EITHER(PROBE_TARE, HAS_Z_SERVO_PROBE) +#if ANY(PROBE_TARE, HAS_Z_SERVO_PROBE) #include "../../../module/probe.h" #endif @@ -249,7 +249,7 @@ void tft_lvgl_init() { if (ready) lv_draw_ready_print(); - #if BOTH(MKS_TEST, SDSUPPORT) + #if ALL(MKS_TEST, SDSUPPORT) if (mks_test_flag == 0x1E) mks_gpio_test(); #endif } diff --git a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp index 0e55b3448ba1..338811bc0534 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp @@ -25,7 +25,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) +#if ALL(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) #include "tft_lvgl_configuration.h" diff --git a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.cpp b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.cpp index 654fca6cb334..92fd139dfa5d 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.cpp @@ -23,7 +23,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) +#if ALL(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) #include "tft_lvgl_configuration.h" diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp index a8d30b442a9b..b515d41f62d2 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) +#if ALL(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) #include "draw_ui.h" #include "wifi_module.h" diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp index 18a311303ccf..3c981d602ad6 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) +#if ALL(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) #include "draw_ui.h" #include "wifi_module.h" diff --git a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp index 63c25177a679..ce45332e28d4 100644 --- a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp +++ b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp @@ -294,7 +294,7 @@ void NextionTFT::PanelInfo(uint8_t req) { break; case 26: // TMC Hybrid Threshold Speed - #if 0 && BOTH(HAS_TRINAMIC_CONFIG, HYBRID_THRESHOLD) + #if 0 && ALL(HAS_TRINAMIC_CONFIG, HYBRID_THRESHOLD) #define SEND_TRINAMIC_THRS(A, B) SEND_VALasTXT(A, getAxisPWMthrs(B)) #else #define SEND_TRINAMIC_THRS(A, B) SEND_NA(A) @@ -463,7 +463,7 @@ void NextionTFT::PanelInfo(uint8_t req) { #else #define SEND_PID_INFO_0(A, B) SEND_NA(A) #endif - #if BOTH(PIDTEMP, HAS_MULTI_EXTRUDER) + #if ALL(PIDTEMP, HAS_MULTI_EXTRUDER) #define SEND_PID_INFO_1(A, B) SEND_VALasTXT(A, getPID_K##B(E1)) #else #define SEND_PID_INFO_1(A, B) SEND_NA(A) diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index 576fc56b7863..a0b15e6c5283 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -931,7 +931,7 @@ namespace ExtUI { } void moveToMeshPoint(const xy_uint8_t &pos, const_float_t z) { - #if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) + #if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) const feedRate_t old_feedrate = feedrate_mm_s; const float x_target = MESH_MIN_X + pos.x * (MESH_X_DIST), y_target = MESH_MIN_Y + pos.y * (MESH_Y_DIST); diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 604e9bb0ca7a..1532f40d0158 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -24,7 +24,7 @@ #include "../MarlinCore.h" // for printingIsPaused -#if LED_POWEROFF_TIMEOUT > 0 || BOTH(HAS_WIRED_LCD, PRINTER_EVENT_LEDS) +#if LED_POWEROFF_TIMEOUT > 0 || ALL(HAS_WIRED_LCD, PRINTER_EVENT_LEDS) #include "../feature/leds/leds.h" #endif @@ -32,7 +32,7 @@ #include "../feature/host_actions.h" #endif -#if BOTH(BROWSE_MEDIA_ON_INSERT, PASSWORD_ON_SD_PRINT_MENU) +#if ALL(BROWSE_MEDIA_ON_INSERT, PASSWORD_ON_SD_PRINT_MENU) #include "../feature/password/password.h" #endif @@ -68,7 +68,7 @@ MarlinUI ui; constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; #if HAS_STATUS_MESSAGE - #if ENABLED(STATUS_MESSAGE_SCROLLING) && EITHER(HAS_WIRED_LCD, DWIN_LCD_PROUI) + #if ENABLED(STATUS_MESSAGE_SCROLLING) && ANY(HAS_WIRED_LCD, DWIN_LCD_PROUI) uint8_t MarlinUI::status_scroll_offset; // = 0 #endif char MarlinUI::status_message[MAX_MESSAGE_LENGTH + 1]; @@ -154,7 +154,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; } #endif -#if EITHER(HAS_MARLINUI_MENU, EXTENSIBLE_UI) +#if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI) bool MarlinUI::lcd_clicked; #endif @@ -265,7 +265,7 @@ void MarlinUI::init() { #endif // HAS_SHIFT_ENCODER - #if BOTH(HAS_ENCODER_ACTION, HAS_SLOW_BUTTONS) + #if ALL(HAS_ENCODER_ACTION, HAS_SLOW_BUTTONS) slow_buttons = 0; #endif @@ -334,7 +334,7 @@ void MarlinUI::init() { uint8_t MarlinUI::lcd_status_update_delay = 1; // First update one loop delayed - #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT) millis_t MarlinUI::next_filament_display; // = 0 #endif @@ -397,7 +397,7 @@ void MarlinUI::init() { } #endif - #if EITHER(REVERSE_MENU_DIRECTION, REVERSE_SELECT_DIRECTION) + #if ANY(REVERSE_MENU_DIRECTION, REVERSE_SELECT_DIRECTION) int8_t MarlinUI::encoderDirection = ENCODERBASE; #endif @@ -406,7 +406,7 @@ void MarlinUI::init() { uint8_t MarlinUI::repeat_delay; #endif - #if EITHER(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) + #if ANY(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) bool MarlinUI::external_control; // = false @@ -569,7 +569,7 @@ void MarlinUI::init() { #endif if (homed) { - #if EITHER(DELTA, Z_HOME_TO_MAX) + #if ANY(DELTA, Z_HOME_TO_MAX) if (RRK(EN_KEYPAD_F2)) _reprapworld_keypad_move(Z_AXIS, 1); #endif if (RRK(EN_KEYPAD_F3)) _reprapworld_keypad_move(Z_AXIS, -1); @@ -665,7 +665,7 @@ void MarlinUI::init() { #if HAS_MARLINUI_MENU if (use_click()) { - #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT) pause_filament_display(); #endif goto_screen(menu_main); @@ -697,7 +697,7 @@ void MarlinUI::init() { if (old_frm != new_frm) { feedrate_percentage = new_frm; encoderPosition = 0; - #if BOTH(HAS_SOUND, BEEP_ON_FEEDRATE_CHANGE) + #if ALL(HAS_SOUND, BEEP_ON_FEEDRATE_CHANGE) static millis_t next_beep; #ifndef GOT_MS const millis_t ms = millis(); @@ -1041,7 +1041,7 @@ void MarlinUI::init() { if (encoderPastThreshold || lcd_clicked) { if (encoderPastThreshold && TERN1(IS_TFTGLCD_PANEL, !external_control)) { - #if BOTH(HAS_MARLINUI_MENU, ENCODER_RATE_MULTIPLIER) + #if ALL(HAS_MARLINUI_MENU, ENCODER_RATE_MULTIPLIER) int32_t encoderMultiplier = 1; @@ -1107,7 +1107,7 @@ void MarlinUI::init() { refresh(LCDVIEW_REDRAW_NOW); } - #if BOTH(HAS_MARLINUI_MENU, SCROLL_LONG_FILENAMES) + #if ALL(HAS_MARLINUI_MENU, SCROLL_LONG_FILENAMES) // If scrolling of long file names is enabled and we are in the sd card menu, // cause a refresh to occur until all the text has scrolled into view. if (currentScreen == menu_media && !lcd_status_update_delay--) { @@ -1342,7 +1342,7 @@ void MarlinUI::init() { #endif // UP || DOWN || LEFT || RIGHT buttons = (newbutton | TERN0(HAS_SLOW_BUTTONS, slow_buttons) - #if BOTH(HAS_TOUCH_BUTTONS, HAS_ENCODER_ACTION) + #if ALL(HAS_TOUCH_BUTTONS, HAS_ENCODER_ACTION) | (touch_buttons & TERN(HAS_ENCODER_WHEEL, ~(EN_A | EN_B), 0xFF)) #endif ); @@ -1402,7 +1402,7 @@ void MarlinUI::init() { case 3: ENCODER_SPIN(2, 1); break; case 1: ENCODER_SPIN(3, 0); break; } - #if BOTH(HAS_MARLINUI_MENU, AUTO_BED_LEVELING_UBL) + #if ALL(HAS_MARLINUI_MENU, AUTO_BED_LEVELING_UBL) external_encoder(); #endif lastEncoderBits = enc; @@ -1576,7 +1576,7 @@ void MarlinUI::init() { #if HAS_WIRED_LCD - #if BASIC_PROGRESS_BAR || BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if BASIC_PROGRESS_BAR || ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT) const millis_t ms = millis(); #endif @@ -1587,13 +1587,13 @@ void MarlinUI::init() { #endif #endif - #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT) pause_filament_display(ms); // Show status message for 5s #endif #endif - #if ENABLED(STATUS_MESSAGE_SCROLLING) && EITHER(HAS_WIRED_LCD, DWIN_LCD_PROUI) + #if ENABLED(STATUS_MESSAGE_SCROLLING) && ANY(HAS_WIRED_LCD, DWIN_LCD_PROUI) status_scroll_offset = 0; #endif @@ -1659,7 +1659,7 @@ void MarlinUI::init() { TERN_(DWIN_LCD_PROUI, HMI_flag.abort_flag = true); } - #if BOTH(HAS_MARLINUI_MENU, PSU_CONTROL) + #if ALL(HAS_MARLINUI_MENU, PSU_CONTROL) void MarlinUI::poweroff() { queue.inject(F("M81" TERN_(POWER_OFF_WAIT_FOR_COOLDOWN, "S"))); @@ -1834,7 +1834,7 @@ void MarlinUI::init() { #endif } - #if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) + #if ANY(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) void MarlinUI::zoffset_overlay(const_float_t zvalue) { // Determine whether the user is raising or lowering the nozzle. static int8_t dir; @@ -1849,7 +1849,7 @@ void MarlinUI::init() { #endif -#if BOTH(EXTENSIBLE_UI, ADVANCED_PAUSE_FEATURE) +#if ALL(EXTENSIBLE_UI, ADVANCED_PAUSE_FEATURE) void MarlinUI::pause_show_message( const PauseMessage message, diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index e33eda05911c..d383014da18e 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -88,7 +88,7 @@ typedef bool (*statusResetFunc_t)(); #endif // HAS_WIRED_LCD -#if EITHER(HAS_WIRED_LCD, DWIN_CREALITY_LCD_JYERSUI) +#if ANY(HAS_WIRED_LCD, DWIN_CREALITY_LCD_JYERSUI) #define LCD_WITH_BLINK 1 #define LCD_UPDATE_INTERVAL TERN(HAS_TOUCH_BUTTONS, 50, 100) #endif @@ -246,7 +246,7 @@ class MarlinUI { // LCD implementations static void clear_lcd(); - #if BOTH(HAS_MARLINUI_MENU, TOUCH_SCREEN_CALIBRATION) + #if ALL(HAS_MARLINUI_MENU, TOUCH_SCREEN_CALIBRATION) static void check_touch_calibration() { if (touch_calibration.need_calibration()) currentScreen = touch_calibration_screen; } @@ -313,7 +313,7 @@ class MarlinUI { static void set_progress_done() { progress_override = (PROGRESS_MASK + 1U) + 100U * (PROGRESS_SCALE); } static void progress_reset() { if (progress_override & (PROGRESS_MASK + 1U)) set_progress(0); } #endif - #if EITHER(SHOW_REMAINING_TIME, SET_PROGRESS_MANUALLY) + #if ANY(SHOW_REMAINING_TIME, SET_PROGRESS_MANUALLY) static uint32_t _calculated_remaining_time() { const duration_t elapsed = print_job_timer.duration(); const progress_t progress = _get_progress(); @@ -359,7 +359,7 @@ class MarlinUI { #if HAS_STATUS_MESSAGE - #if EITHER(HAS_WIRED_LCD, DWIN_LCD_PROUI) + #if ANY(HAS_WIRED_LCD, DWIN_LCD_PROUI) #if ENABLED(STATUS_MESSAGE_SCROLLING) #define MAX_MESSAGE_LENGTH _MAX(LONG_FILENAME_LENGTH, MAX_LANG_CHARSIZE * 2 * (LCD_WIDTH)) #else @@ -410,7 +410,7 @@ class MarlinUI { static void resume_print(); static void flow_fault(); - #if BOTH(HAS_MARLINUI_MENU, PSU_CONTROL) + #if ALL(HAS_MARLINUI_MENU, PSU_CONTROL) static void poweroff(); #endif @@ -469,7 +469,7 @@ class MarlinUI { FORCE_INLINE static void refresh_contrast() { set_contrast(contrast); } #endif - #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT) static millis_t next_filament_display; static void pause_filament_display(const millis_t ms=millis()) { next_filament_display = ms + 5000UL; } #endif @@ -508,7 +508,7 @@ class MarlinUI { static bool did_first_redraw; #endif - #if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) + #if ANY(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) static void zoffset_overlay(const int8_t dir); static void zoffset_overlay(const_float_t zvalue); #endif @@ -532,7 +532,7 @@ class MarlinUI { #endif #if ENABLED(SDSUPPORT) - #if BOTH(SCROLL_LONG_FILENAMES, HAS_MARLINUI_MENU) + #if ALL(SCROLL_LONG_FILENAMES, HAS_MARLINUI_MENU) #define MARLINUI_SCROLL_NAME 1 #endif #if MARLINUI_SCROLL_NAME @@ -644,7 +644,7 @@ class MarlinUI { #endif - #if EITHER(HAS_MARLINUI_MENU, EXTENSIBLE_UI) + #if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI) static bool lcd_clicked; static bool use_click() { const bool click = lcd_clicked; @@ -682,7 +682,7 @@ class MarlinUI { // // Special handling if a move is underway // - #if ANY(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION, PROBE_OFFSET_WIZARD, X_AXIS_TWIST_COMPENSATION) || (ENABLED(LCD_BED_LEVELING) && EITHER(PROBE_MANUALLY, MESH_BED_LEVELING)) + #if ANY(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION, PROBE_OFFSET_WIZARD, X_AXIS_TWIST_COMPENSATION) || (ENABLED(LCD_BED_LEVELING) && ANY(PROBE_MANUALLY, MESH_BED_LEVELING)) #define LCD_HAS_WAIT_FOR_MOVE 1 static bool wait_for_move; #else @@ -692,7 +692,7 @@ class MarlinUI { // // Block interaction while under external control // - #if HAS_MARLINUI_MENU && EITHER(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) + #if HAS_MARLINUI_MENU && ANY(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) static bool external_control; FORCE_INLINE static void capture() { external_control = true; } FORCE_INLINE static void release() { external_control = false; } @@ -735,7 +735,7 @@ class MarlinUI { static bool hw_button_pressed() { return BUTTON_CLICK(); } #endif - #if EITHER(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) + #if ANY(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) static void wait_for_release(); #endif @@ -743,14 +743,14 @@ class MarlinUI { #define ENCODERBASE (TERN(REVERSE_ENCODER_DIRECTION, -1, +1)) - #if EITHER(REVERSE_MENU_DIRECTION, REVERSE_SELECT_DIRECTION) + #if ANY(REVERSE_MENU_DIRECTION, REVERSE_SELECT_DIRECTION) static int8_t encoderDirection; #else static constexpr int8_t encoderDirection = ENCODERBASE; #endif FORCE_INLINE static void encoder_direction_normal() { - #if EITHER(REVERSE_MENU_DIRECTION, REVERSE_SELECT_DIRECTION) + #if ANY(REVERSE_MENU_DIRECTION, REVERSE_SELECT_DIRECTION) encoderDirection = ENCODERBASE; #endif } diff --git a/Marlin/src/lcd/menu/menu.cpp b/Marlin/src/lcd/menu/menu.cpp index 21546b0c8b8c..8205d5a26f68 100644 --- a/Marlin/src/lcd/menu/menu.cpp +++ b/Marlin/src/lcd/menu/menu.cpp @@ -176,7 +176,7 @@ void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, co TERN_(SET_PROGRESS_PERCENT, progress_reset()); - #if BOTH(DOUBLECLICK_FOR_Z_BABYSTEPPING, BABYSTEPPING) + #if ALL(DOUBLECLICK_FOR_Z_BABYSTEPPING, BABYSTEPPING) static millis_t doubleclick_expire_ms = 0; // Going to menu_main from status screen? Remember first click time. // Going back to status screen within a very short time? Go to Z babystepping. diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index f56b4f899731..6438121b0688 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -268,7 +268,7 @@ void menu_backlash(); } #endif -#if BOTH(AUTOTEMP, HAS_TEMP_HOTEND) || ANY(PID_AUTOTUNE_MENU, PID_EDIT_MENU, MPC_AUTOTUNE_MENU, MPC_EDIT_MENU) +#if ALL(AUTOTEMP, HAS_TEMP_HOTEND) || ANY(PID_AUTOTUNE_MENU, PID_EDIT_MENU, MPC_AUTOTUNE_MENU, MPC_EDIT_MENU) #define SHOW_MENU_ADVANCED_TEMPERATURE 1 #endif @@ -294,7 +294,7 @@ void menu_backlash(); // // Autotemp, Min, Max, Fact // - #if BOTH(AUTOTEMP, HAS_TEMP_HOTEND) + #if ALL(AUTOTEMP, HAS_TEMP_HOTEND) EDIT_ITEM(bool, MSG_AUTOTEMP, &planner.autotemp_enabled); EDIT_ITEM(int3, MSG_MIN, &planner.autotemp_min, 0, thermalManager.hotend_max_target(0)); EDIT_ITEM(int3, MSG_MAX, &planner.autotemp_max, 0, thermalManager.hotend_max_target(0)); @@ -310,7 +310,7 @@ void menu_backlash(); // PID-P E5, PID-I E5, PID-D E5, PID-C E5, PID Autotune E5 // - #if BOTH(PIDTEMP, PID_EDIT_MENU) + #if ALL(PIDTEMP, PID_EDIT_MENU) #define __PID_HOTEND_MENU_ITEMS(N) \ raw_Kp = thermalManager.temp_hotend[N].pid.p(); \ raw_Ki = thermalManager.temp_hotend[N].pid.i(); \ @@ -343,7 +343,7 @@ void menu_backlash(); #endif - #if ENABLED(PID_EDIT_MENU) && EITHER(PIDTEMPBED, PIDTEMPCHAMBER) + #if ENABLED(PID_EDIT_MENU) && ANY(PIDTEMPBED, PIDTEMPCHAMBER) #define _PID_EDIT_ITEMS_TMPL(N,T) \ raw_Kp = T.pid.p(); \ raw_Ki = T.pid.i(); \ diff --git a/Marlin/src/lcd/menu/menu_backlash.cpp b/Marlin/src/lcd/menu/menu_backlash.cpp index e71606fc12a9..33788c93903d 100644 --- a/Marlin/src/lcd/menu/menu_backlash.cpp +++ b/Marlin/src/lcd/menu/menu_backlash.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_MENU, BACKLASH_GCODE) +#if ALL(HAS_MARLINUI_MENU, BACKLASH_GCODE) #include "menu_item.h" @@ -39,7 +39,7 @@ void menu_backlash() { editable.uint8 = backlash.get_correction_uint8(); EDIT_ITEM_FAST(percent, MSG_BACKLASH_CORRECTION, &editable.uint8, backlash.all_off, backlash.all_on, []{ backlash.set_correction_uint8(editable.uint8); }); - #if DISABLED(CORE_BACKLASH) || EITHER(MARKFORGED_XY, MARKFORGED_YX) + #if DISABLED(CORE_BACKLASH) || ANY(MARKFORGED_XY, MARKFORGED_YX) #define _CAN_CALI AXIS_CAN_CALIBRATE #else #define _CAN_CALI(A) true diff --git a/Marlin/src/lcd/menu/menu_bed_corners.cpp b/Marlin/src/lcd/menu/menu_bed_corners.cpp index 0e0051e65d6c..84a2c11a8d2e 100644 --- a/Marlin/src/lcd/menu/menu_bed_corners.cpp +++ b/Marlin/src/lcd/menu/menu_bed_corners.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_MENU, LCD_BED_TRAMMING) +#if ALL(HAS_MARLINUI_MENU, LCD_BED_TRAMMING) #include "menu_item.h" #include "../../module/motion.h" diff --git a/Marlin/src/lcd/menu/menu_bed_leveling.cpp b/Marlin/src/lcd/menu/menu_bed_leveling.cpp index 9505a82dd77c..1f2c00179327 100644 --- a/Marlin/src/lcd/menu/menu_bed_leveling.cpp +++ b/Marlin/src/lcd/menu/menu_bed_leveling.cpp @@ -43,7 +43,7 @@ #endif #endif -#if EITHER(PROBE_MANUALLY, MESH_BED_LEVELING) +#if ANY(PROBE_MANUALLY, MESH_BED_LEVELING) #include "../../module/motion.h" #include "../../gcode/queue.h" @@ -169,7 +169,7 @@ if (ui.should_draw()) { MenuItem_static::draw(1, GET_TEXT_F(MSG_LEVEL_BED_WAITING)); // Color UI needs a control to detect a touch - #if BOTH(TOUCH_SCREEN, HAS_GRAPHICAL_TFT) + #if ALL(TOUCH_SCREEN, HAS_GRAPHICAL_TFT) touch.add_control(CLICK, 0, 0, TFT_WIDTH, TFT_HEIGHT); #endif } @@ -249,7 +249,7 @@ void menu_bed_leveling() { #endif // Level Bed - #if EITHER(PROBE_MANUALLY, MESH_BED_LEVELING) + #if ANY(PROBE_MANUALLY, MESH_BED_LEVELING) // Manual leveling uses a guided procedure SUBMENU(MSG_LEVEL_BED, _lcd_level_bed_continue); #else diff --git a/Marlin/src/lcd/menu/menu_cancelobject.cpp b/Marlin/src/lcd/menu/menu_cancelobject.cpp index b2d36bf8c30d..881168eccb2a 100644 --- a/Marlin/src/lcd/menu/menu_cancelobject.cpp +++ b/Marlin/src/lcd/menu/menu_cancelobject.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_MENU, CANCEL_OBJECTS) +#if ALL(HAS_MARLINUI_MENU, CANCEL_OBJECTS) #include "menu_item.h" #include "menu_addon.h" diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index e50cd69f6302..1009c9d58a6f 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -60,7 +60,7 @@ #define HAS_DEBUG_MENU ENABLED(LCD_PROGRESS_BAR_TEST) void menu_advanced_settings(); -#if EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) +#if ANY(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) void menu_delta_calibrate(); #endif @@ -507,7 +507,7 @@ void menu_configuration() { #endif if (!busy) { - #if EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) + #if ANY(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) SUBMENU(MSG_DELTA_CALIBRATE, menu_delta_calibrate); #endif diff --git a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp index 04bb81569159..528f30c68753 100644 --- a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp +++ b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if HAS_MARLINUI_MENU && EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) +#if HAS_MARLINUI_MENU && ANY(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) #include "menu_item.h" #include "../../module/delta.h" diff --git a/Marlin/src/lcd/menu/menu_filament.cpp b/Marlin/src/lcd/menu/menu_filament.cpp index 122f0c405099..9c86d9eceeb8 100644 --- a/Marlin/src/lcd/menu/menu_filament.cpp +++ b/Marlin/src/lcd/menu/menu_filament.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_MENU, ADVANCED_PAUSE_FEATURE) +#if ALL(HAS_MARLINUI_MENU, ADVANCED_PAUSE_FEATURE) #include "menu_item.h" #include "../../module/temperature.h" diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index 101861074d95..1b41c8e9cc89 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_MENU, LCD_INFO_MENU) +#if ALL(HAS_MARLINUI_MENU, LCD_INFO_MENU) #include "menu_item.h" diff --git a/Marlin/src/lcd/menu/menu_job_recovery.cpp b/Marlin/src/lcd/menu/menu_job_recovery.cpp index 6329c5839786..b2276aeb0cdd 100644 --- a/Marlin/src/lcd/menu/menu_job_recovery.cpp +++ b/Marlin/src/lcd/menu/menu_job_recovery.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_MENU, POWER_LOSS_RECOVERY) +#if ALL(HAS_MARLINUI_MENU, POWER_LOSS_RECOVERY) #include "menu_item.h" #include "../../gcode/queue.h" diff --git a/Marlin/src/lcd/menu/menu_led.cpp b/Marlin/src/lcd/menu/menu_led.cpp index 867e4dafa940..7c5c7809f711 100644 --- a/Marlin/src/lcd/menu/menu_led.cpp +++ b/Marlin/src/lcd/menu/menu_led.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if HAS_MARLINUI_MENU && EITHER(LED_CONTROL_MENU, CASE_LIGHT_MENU) +#if HAS_MARLINUI_MENU && ANY(LED_CONTROL_MENU, CASE_LIGHT_MENU) #include "menu_item.h" diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 81b36d2b01a9..3459fd34dbd4 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -43,7 +43,7 @@ #include "game/game.h" #endif -#if EITHER(SDSUPPORT, HOST_PROMPT_SUPPORT) || defined(ACTION_ON_CANCEL) +#if ANY(SDSUPPORT, HOST_PROMPT_SUPPORT) || defined(ACTION_ON_CANCEL) #define MACHINE_CAN_STOP 1 #endif #if ANY(SDSUPPORT, HOST_PROMPT_SUPPORT, PARK_HEAD_ON_PAUSE) || defined(ACTION_ON_PAUSE) @@ -88,7 +88,7 @@ void menu_configuration(); void menu_info(); #endif -#if EITHER(LED_CONTROL_MENU, CASE_LIGHT_MENU) +#if ANY(LED_CONTROL_MENU, CASE_LIGHT_MENU) void menu_led(); #endif @@ -273,7 +273,7 @@ void menu_main() { #endif } else { - #if BOTH(SDSUPPORT, MEDIA_MENU_AT_TOP) + #if ALL(SDSUPPORT, MEDIA_MENU_AT_TOP) // BEGIN MEDIA MENU #if ENABLED(MENU_ADDAUTOSTART) ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files @@ -326,7 +326,7 @@ void menu_main() { SUBMENU(MSG_MOTION, menu_motion); } - #if BOTH(ADVANCED_PAUSE_FEATURE, DISABLE_ENCODER) + #if ALL(ADVANCED_PAUSE_FEATURE, DISABLE_ENCODER) FILAMENT_CHANGE_ITEM(); #endif @@ -366,7 +366,7 @@ void menu_main() { SUBMENU(MSG_INFO_MENU, menu_info); #endif - #if EITHER(LED_CONTROL_MENU, CASE_LIGHT_MENU) + #if ANY(LED_CONTROL_MENU, CASE_LIGHT_MENU) SUBMENU(MSG_LEDS, menu_led); #endif diff --git a/Marlin/src/lcd/menu/menu_media.cpp b/Marlin/src/lcd/menu/menu_media.cpp index 20ef6e3d198f..74affa1da6e6 100644 --- a/Marlin/src/lcd/menu/menu_media.cpp +++ b/Marlin/src/lcd/menu/menu_media.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_MENU, SDSUPPORT) +#if ALL(HAS_MARLINUI_MENU, SDSUPPORT) #include "menu_item.h" #include "../../sd/cardreader.h" diff --git a/Marlin/src/lcd/menu/menu_mixer.cpp b/Marlin/src/lcd/menu/menu_mixer.cpp index f787d47d0f4d..d6858ba0fd62 100644 --- a/Marlin/src/lcd/menu/menu_mixer.cpp +++ b/Marlin/src/lcd/menu/menu_mixer.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_MENU, MIXING_EXTRUDER) +#if ALL(HAS_MARLINUI_MENU, MIXING_EXTRUDER) #include "menu_item.h" #include "menu_addon.h" diff --git a/Marlin/src/lcd/menu/menu_mmu2.cpp b/Marlin/src/lcd/menu/menu_mmu2.cpp index a2412b0f6ae8..0b2fa51e4a8c 100644 --- a/Marlin/src/lcd/menu/menu_mmu2.cpp +++ b/Marlin/src/lcd/menu/menu_mmu2.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if BOTH(HAS_MARLINUI_MENU, MMU2_MENUS) +#if ALL(HAS_MARLINUI_MENU, MMU2_MENUS) #include "../../MarlinCore.h" #include "../../feature/mmu/mmu2.h" diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index 81068ae30b53..2fac23596925 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -118,7 +118,7 @@ void lcd_move_axis(const AxisEnum axis) { #endif // E_MANUAL -#if EITHER(PROBE_OFFSET_WIZARD, X_AXIS_TWIST_COMPENSATION) +#if ANY(PROBE_OFFSET_WIZARD, X_AXIS_TWIST_COMPENSATION) void _goto_manual_move_z(const_float_t scale) { ui.manual_move.menu_scale = scale; @@ -206,7 +206,7 @@ void menu_move() { START_MENU(); BACK_ITEM(MSG_MOTION); - #if BOTH(HAS_SOFTWARE_ENDSTOPS, SOFT_ENDSTOPS_MENU_ITEM) + #if ALL(HAS_SOFTWARE_ENDSTOPS, SOFT_ENDSTOPS_MENU_ITEM) EDIT_ITEM(bool, MSG_LCD_SOFT_ENDSTOPS, &soft_endstop._enabled); #endif @@ -264,7 +264,7 @@ void menu_move() { #define SUBMENU_MOVE_E(N) SUBMENU_N(N, MSG_MOVE_EN, []{ _menu_move_distance(E_AXIS, []{ lcd_move_e(N); }, N); }); - #if EITHER(SWITCHING_EXTRUDER, SWITCHING_NOZZLE) + #if ANY(SWITCHING_EXTRUDER, SWITCHING_NOZZLE) // ...and the non-switching #if E_MANUAL == 7 || E_MANUAL == 5 || E_MANUAL == 3 @@ -346,7 +346,7 @@ void menu_motion() { // // Auto Z-Align // - #if EITHER(Z_STEPPER_AUTO_ALIGN, MECHANICAL_GANTRY_CALIBRATION) + #if ANY(Z_STEPPER_AUTO_ALIGN, MECHANICAL_GANTRY_CALIBRATION) GCODES_ITEM(MSG_AUTO_Z_ALIGN, F("G34")); #endif diff --git a/Marlin/src/lcd/menu/menu_password.cpp b/Marlin/src/lcd/menu/menu_password.cpp index b50194d60dc8..6ca4202f6c27 100644 --- a/Marlin/src/lcd/menu/menu_password.cpp +++ b/Marlin/src/lcd/menu/menu_password.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_MENU, PASSWORD_FEATURE) +#if ALL(HAS_MARLINUI_MENU, PASSWORD_FEATURE) #include "../../feature/password/password.h" diff --git a/Marlin/src/lcd/menu/menu_temperature.cpp b/Marlin/src/lcd/menu/menu_temperature.cpp index 2e5b8f1e54ce..4c07be88afb7 100644 --- a/Marlin/src/lcd/menu/menu_temperature.cpp +++ b/Marlin/src/lcd/menu/menu_temperature.cpp @@ -35,7 +35,7 @@ #include "../../module/motion.h" #endif -#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) +#if ANY(HAS_COOLER, LASER_COOLANT_FLOW_METER) #include "../../feature/cooler.h" #endif diff --git a/Marlin/src/lcd/menu/menu_touch_screen.cpp b/Marlin/src/lcd/menu/menu_touch_screen.cpp index 130308dadffa..93380cb0e04a 100644 --- a/Marlin/src/lcd/menu/menu_touch_screen.cpp +++ b/Marlin/src/lcd/menu/menu_touch_screen.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_MENU, TOUCH_SCREEN_CALIBRATION) +#if ALL(HAS_MARLINUI_MENU, TOUCH_SCREEN_CALIBRATION) #include "menu_item.h" #include "../marlinui.h" diff --git a/Marlin/src/lcd/menu/menu_tramming.cpp b/Marlin/src/lcd/menu/menu_tramming.cpp index 1dd8a1cab6fd..c7d85282b41e 100644 --- a/Marlin/src/lcd/menu/menu_tramming.cpp +++ b/Marlin/src/lcd/menu/menu_tramming.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_MENU, ASSISTED_TRAMMING_WIZARD) +#if ALL(HAS_MARLINUI_MENU, ASSISTED_TRAMMING_WIZARD) #include "menu_item.h" diff --git a/Marlin/src/lcd/menu/menu_tune.cpp b/Marlin/src/lcd/menu/menu_tune.cpp index a4a30882214a..840ac6731b5d 100644 --- a/Marlin/src/lcd/menu/menu_tune.cpp +++ b/Marlin/src/lcd/menu/menu_tune.cpp @@ -119,7 +119,7 @@ void menu_tune() { // // Manual bed leveling, Bed Z: // - #if BOTH(MESH_BED_LEVELING, LCD_BED_LEVELING) + #if ALL(MESH_BED_LEVELING, LCD_BED_LEVELING) EDIT_ITEM(float43, MSG_BED_Z, &bedlevel.z_offset, -1, 1); #endif diff --git a/Marlin/src/lcd/menu/menu_ubl.cpp b/Marlin/src/lcd/menu/menu_ubl.cpp index d6f42faa5558..c8fd33d26df0 100644 --- a/Marlin/src/lcd/menu/menu_ubl.cpp +++ b/Marlin/src/lcd/menu/menu_ubl.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_MENU, AUTO_BED_LEVELING_UBL) +#if ALL(HAS_MARLINUI_MENU, AUTO_BED_LEVELING_UBL) #include "menu_item.h" #include "../../gcode/gcode.h" diff --git a/Marlin/src/lcd/menu/menu_x_twist.cpp b/Marlin/src/lcd/menu/menu_x_twist.cpp index a069b427c6bf..3838e9b08828 100644 --- a/Marlin/src/lcd/menu/menu_x_twist.cpp +++ b/Marlin/src/lcd/menu/menu_x_twist.cpp @@ -170,7 +170,7 @@ void xatc_wizard_homing_done() { MenuItem_static::draw(1, GET_TEXT_F(MSG_LEVEL_BED_WAITING)); // Color UI needs a control to detect a touch - #if BOTH(TOUCH_SCREEN, HAS_GRAPHICAL_TFT) + #if ALL(TOUCH_SCREEN, HAS_GRAPHICAL_TFT) touch.add_control(CLICK, 0, 0, TFT_WIDTH, TFT_HEIGHT); #endif } diff --git a/Marlin/src/lcd/tft/ui_1024x600.cpp b/Marlin/src/lcd/tft/ui_1024x600.cpp index 08d6b51fdbba..e2065f217334 100644 --- a/Marlin/src/lcd/tft/ui_1024x600.cpp +++ b/Marlin/src/lcd/tft/ui_1024x600.cpp @@ -36,7 +36,7 @@ #include "../../module/planner.h" #include "../../module/motion.h" -#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) +#if DISABLED(LCD_PROGRESS_BAR) && ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT) #include "../../feature/filwidth.h" #include "../../gcode/parser.h" #endif @@ -605,7 +605,7 @@ MotionAxisState motionAxisState; static void quick_feedback() { #if HAS_CHIRP ui.chirp(); // Buzz and wait. Is the delay needed for buttons to settle? - #if BOTH(HAS_MARLINUI_MENU, HAS_BEEPER) + #if ALL(HAS_MARLINUI_MENU, HAS_BEEPER) for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); } #elif HAS_MARLINUI_MENU delay(10); @@ -795,7 +795,7 @@ static void z_minus() { moveAxis(Z_AXIS, -1); } } #endif -#if BOTH(HAS_BED_PROBE, TOUCH_SCREEN) +#if ALL(HAS_BED_PROBE, TOUCH_SCREEN) static void z_select() { motionAxisState.z_selection *= -1; quick_feedback(); @@ -890,7 +890,7 @@ void MarlinUI::move_axis_screen() { motionAxisState.zTypePos.x = x; motionAxisState.zTypePos.y = y; drawCurZSelection(); - #if BOTH(HAS_BED_PROBE, TOUCH_SCREEN) + #if ALL(HAS_BED_PROBE, TOUCH_SCREEN) if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select); #endif diff --git a/Marlin/src/lcd/tft/ui_320x240.cpp b/Marlin/src/lcd/tft/ui_320x240.cpp index 9014d4ed1216..d6f8b91391a0 100644 --- a/Marlin/src/lcd/tft/ui_320x240.cpp +++ b/Marlin/src/lcd/tft/ui_320x240.cpp @@ -36,7 +36,7 @@ #include "../../module/planner.h" #include "../../module/motion.h" -#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) +#if DISABLED(LCD_PROGRESS_BAR) && ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT) #include "../../feature/filwidth.h" #include "../../gcode/parser.h" #endif @@ -581,7 +581,7 @@ MotionAxisState motionAxisState; static void quick_feedback() { #if HAS_CHIRP ui.chirp(); // Buzz and wait. Is the delay needed for buttons to settle? - #if BOTH(HAS_MARLINUI_MENU, HAS_BEEPER) + #if ALL(HAS_MARLINUI_MENU, HAS_BEEPER) for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); } #elif HAS_MARLINUI_MENU delay(10); @@ -775,7 +775,7 @@ static void z_minus() { moveAxis(Z_AXIS, -1); } } #endif -#if BOTH(HAS_BED_PROBE, TOUCH_SCREEN) +#if ALL(HAS_BED_PROBE, TOUCH_SCREEN) static void z_select() { motionAxisState.z_selection *= -1; quick_feedback(); @@ -870,7 +870,7 @@ void MarlinUI::move_axis_screen() { motionAxisState.zTypePos.x = x; motionAxisState.zTypePos.y = y; drawCurZSelection(); - #if BOTH(HAS_BED_PROBE, TOUCH_SCREEN) + #if ALL(HAS_BED_PROBE, TOUCH_SCREEN) if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select); #endif diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index 22c3a3fc19c1..bc9c937fc16d 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -36,7 +36,7 @@ #include "../../module/planner.h" #include "../../module/motion.h" -#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) +#if DISABLED(LCD_PROGRESS_BAR) && ALL(FILAMENT_LCD_DISPLAY, SDSUPPORT) #include "../../feature/filwidth.h" #include "../../gcode/parser.h" #endif @@ -586,7 +586,7 @@ MotionAxisState motionAxisState; static void quick_feedback() { #if HAS_CHIRP ui.chirp(); // Buzz and wait. Is the delay needed for buttons to settle? - #if BOTH(HAS_MARLINUI_MENU, HAS_BEEPER) + #if ALL(HAS_MARLINUI_MENU, HAS_BEEPER) for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); } #elif HAS_MARLINUI_MENU delay(10); @@ -776,7 +776,7 @@ static void z_minus() { moveAxis(Z_AXIS, -1); } } #endif -#if BOTH(HAS_BED_PROBE, TOUCH_SCREEN) +#if ALL(HAS_BED_PROBE, TOUCH_SCREEN) static void z_select() { motionAxisState.z_selection *= -1; quick_feedback(); @@ -871,7 +871,7 @@ void MarlinUI::move_axis_screen() { motionAxisState.zTypePos.x = x; motionAxisState.zTypePos.y = y; drawCurZSelection(); - #if BOTH(HAS_BED_PROBE, TOUCH_SCREEN) + #if ALL(HAS_BED_PROBE, TOUCH_SCREEN) if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select); #endif diff --git a/Marlin/src/libs/nozzle.cpp b/Marlin/src/libs/nozzle.cpp index 575e74a81472..0f3790ef8910 100644 --- a/Marlin/src/libs/nozzle.cpp +++ b/Marlin/src/libs/nozzle.cpp @@ -22,7 +22,7 @@ #include "../inc/MarlinConfig.h" -#if EITHER(NOZZLE_CLEAN_FEATURE, NOZZLE_PARK_FEATURE) +#if ANY(NOZZLE_CLEAN_FEATURE, NOZZLE_PARK_FEATURE) #include "nozzle.h" @@ -161,7 +161,7 @@ Nozzle nozzle; void Nozzle::clean(const uint8_t &pattern, const uint8_t &strokes, const_float_t radius, const uint8_t &objects, const uint8_t cleans) { xyz_pos_t start[HOTENDS] = NOZZLE_CLEAN_START_POINT, end[HOTENDS] = NOZZLE_CLEAN_END_POINT, middle[HOTENDS] = NOZZLE_CLEAN_CIRCLE_MIDDLE; - const uint8_t arrPos = EITHER(SINGLENOZZLE, MIXING_EXTRUDER) ? 0 : active_extruder; + const uint8_t arrPos = ANY(SINGLENOZZLE, MIXING_EXTRUDER) ? 0 : active_extruder; #if NOZZLE_CLEAN_MIN_TEMP > 20 if (thermalManager.degTargetHotend(arrPos) < NOZZLE_CLEAN_MIN_TEMP) { diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 2ffd12bb9e90..5cbb4ecfc0f9 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -31,14 +31,14 @@ #include "temperature.h" #include "../lcd/marlinui.h" -#define DEBUG_OUT BOTH(USE_SENSORLESS, DEBUG_LEVELING_FEATURE) +#define DEBUG_OUT ALL(USE_SENSORLESS, DEBUG_LEVELING_FEATURE) #include "../core/debug_out.h" #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE) #include HAL_PATH(.., endstop_interrupts.h) #endif -#if BOTH(SD_ABORT_ON_ENDSTOP_HIT, SDSUPPORT) +#if ALL(SD_ABORT_ON_ENDSTOP_HIT, SDSUPPORT) #include "printcounter.h" // for print_job_timer #endif @@ -546,7 +546,7 @@ void Endstops::event_handler() { ) ); - #if BOTH(SD_ABORT_ON_ENDSTOP_HIT, SDSUPPORT) + #if ALL(SD_ABORT_ON_ENDSTOP_HIT, SDSUPPORT) if (planner.abort_on_endstop_hit) { card.abortFilePrintNow(); quickstop_stepper(); @@ -1381,11 +1381,11 @@ void Endstops::update() { void Endstops::clear_endstop_state() { TERN_(X_SPI_SENSORLESS, CBI(live_state, X_ENDSTOP)); - #if BOTH(X_SPI_SENSORLESS, X_DUAL_ENDSTOPS) + #if ALL(X_SPI_SENSORLESS, X_DUAL_ENDSTOPS) CBI(live_state, X2_ENDSTOP); #endif TERN_(Y_SPI_SENSORLESS, CBI(live_state, Y_ENDSTOP)); - #if BOTH(Y_SPI_SENSORLESS, Y_DUAL_ENDSTOPS) + #if ALL(Y_SPI_SENSORLESS, Y_DUAL_ENDSTOPS) CBI(live_state, Y2_ENDSTOP); #endif TERN_(Z_SPI_SENSORLESS, CBI(live_state, Z_ENDSTOP)); diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 51081f5165fb..f263325649ac 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -247,7 +247,7 @@ void report_current_position_projected() { AutoReporter position_auto_reporter; #endif -#if EITHER(FULL_REPORT_TO_HOST_FEATURE, REALTIME_REPORTING_COMMANDS) +#if ANY(FULL_REPORT_TO_HOST_FEATURE, REALTIME_REPORTING_COMMANDS) M_StateEnum M_State_grbl = M_INIT; @@ -914,7 +914,7 @@ void restore_feedrate_and_scaling() { if (TERN0(DELTA, !all_axes_homed())) return; - #if BOTH(HAS_HOTEND_OFFSET, DELTA) + #if ALL(HAS_HOTEND_OFFSET, DELTA) // The effector center position will be the target minus the hotend offset. const xy_pos_t offs = hotend_offset[active_extruder]; #else @@ -1398,7 +1398,7 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { void prepare_line_to_destination() { apply_motion_limits(destination); - #if EITHER(PREVENT_COLD_EXTRUSION, PREVENT_LENGTHY_EXTRUDE) + #if ANY(PREVENT_COLD_EXTRUSION, PREVENT_LENGTHY_EXTRUDE) if (!DEBUGGING(DRYRUN) && destination.e != current_position.e) { bool ignore_e = false; @@ -1729,12 +1729,12 @@ void prepare_line_to_destination() { if (is_home_dir) { if (TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS)) { - #if BOTH(HAS_HEATED_BED, WAIT_FOR_BED_HEATER) + #if ALL(HAS_HEATED_BED, WAIT_FOR_BED_HEATER) // Wait for bed to heat back up between probing points thermalManager.wait_for_bed_heating(); #endif - #if BOTH(HAS_HOTEND, WAIT_FOR_HOTEND) + #if ALL(HAS_HOTEND, WAIT_FOR_HOTEND) // Wait for the hotend to heat back up between probing points thermalManager.wait_for_hotend_heating(active_extruder); #endif @@ -1751,7 +1751,7 @@ void prepare_line_to_destination() { #endif } - #if EITHER(MORGAN_SCARA, MP_SCARA) + #if ANY(MORGAN_SCARA, MP_SCARA) // Tell the planner the axis is at 0 current_position[axis] = 0; sync_plan_position(); @@ -1949,7 +1949,7 @@ void prepare_line_to_destination() { void homeaxis(const AxisEnum axis) { - #if EITHER(MORGAN_SCARA, MP_SCARA) + #if ANY(MORGAN_SCARA, MP_SCARA) // Only Z homing (with probe) is permitted if (axis != Z_AXIS) { BUZZ(100, 880); return; } #else @@ -2032,7 +2032,7 @@ void prepare_line_to_destination() { if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Home Fast: ", move_length, "mm"); do_homing_move(axis, move_length, 0.0, !use_probe_bump); - #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH) + #if ALL(HOMING_Z_WITH_PROBE, BLTOUCH) if (axis == Z_AXIS && !bltouch.high_speed_mode) bltouch.stow(); // Intermediate STOW (in LOW SPEED MODE) #endif @@ -2079,7 +2079,7 @@ void prepare_line_to_destination() { } #endif - #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH) + #if ALL(HOMING_Z_WITH_PROBE, BLTOUCH) if (axis == Z_AXIS && !bltouch.high_speed_mode && bltouch.deploy()) return; // Intermediate DEPLOY (in LOW SPEED MODE) #endif @@ -2089,7 +2089,7 @@ void prepare_line_to_destination() { if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Re-bump: ", rebump, "mm"); do_homing_move(axis, rebump, get_homing_bump_feedrate(axis), true); - #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH) + #if ALL(HOMING_Z_WITH_PROBE, BLTOUCH) if (axis == Z_AXIS) bltouch.stow(); // The final STOW #endif } @@ -2327,7 +2327,7 @@ void set_axis_is_at_home(const AxisEnum axis) { } #endif - #if EITHER(MORGAN_SCARA, AXEL_TPARA) + #if ANY(MORGAN_SCARA, AXEL_TPARA) scara_set_axis_is_at_home(axis); #elif ENABLED(DELTA) current_position[axis] = (axis == Z_AXIS) ? DIFF_TERN(HAS_BED_PROBE, delta_height, probe.offset.z) : base_home_pos(axis); diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h index 68cadcc47fc9..5ed8e13b41f9 100644 --- a/Marlin/src/module/motion.h +++ b/Marlin/src/module/motion.h @@ -261,7 +261,7 @@ void report_current_position_projected(); extern AutoReporter position_auto_reporter; #endif -#if EITHER(FULL_REPORT_TO_HOST_FEATURE, REALTIME_REPORTING_COMMANDS) +#if ANY(FULL_REPORT_TO_HOST_FEATURE, REALTIME_REPORTING_COMMANDS) #define HAS_GRBL_STATE 1 /** * Machine states for GRBL or TinyG diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index d4e5be306eea..fa6d99f4c982 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -788,7 +788,7 @@ void Planner::calculate_trapezoid_for_block(block_t * const block, const_float_t NOLESS(initial_rate, uint32_t(MINIMAL_STEP_RATE)); NOLESS(final_rate, uint32_t(MINIMAL_STEP_RATE)); - #if EITHER(S_CURVE_ACCELERATION, LIN_ADVANCE) + #if ANY(S_CURVE_ACCELERATION, LIN_ADVANCE) // If we have some plateau time, the cruise rate will be the nominal rate uint32_t cruise_rate = block->nominal_rate; #endif @@ -822,7 +822,7 @@ void Planner::calculate_trapezoid_for_block(block_t * const block, const_float_t accelerate_steps = _MIN(uint32_t(_MAX(accelerate_steps_float, 0)), block->step_event_count); decelerate_steps = block->step_event_count - accelerate_steps; - #if EITHER(S_CURVE_ACCELERATION, LIN_ADVANCE) + #if ANY(S_CURVE_ACCELERATION, LIN_ADVANCE) // We won't reach the cruising rate. Let's calculate the speed we will reach cruise_rate = final_speed(initial_rate, accel, accelerate_steps); #endif @@ -1342,7 +1342,7 @@ void Planner::check_axes_activity() { if (has_blocks_queued()) { - #if EITHER(HAS_TAIL_FAN_SPEED, BARICUDA) + #if ANY(HAS_TAIL_FAN_SPEED, BARICUDA) block_t *block = &block_buffer[block_buffer_tail]; #endif @@ -1762,7 +1762,7 @@ float Planner::get_axis_position_mm(const AxisEnum axis) { else axis_steps = DIFF_TERN(BACKLASH_COMPENSATION, stepper.position(axis), backlash.get_applied_steps(axis)); - #elif EITHER(MARKFORGED_XY, MARKFORGED_YX) + #elif ANY(MARKFORGED_XY, MARKFORGED_YX) // Requesting one of the joined axes? if (axis == CORE_AXIS_1 || axis == CORE_AXIS_2) { @@ -1922,7 +1922,7 @@ bool Planner::_populate_block( ); //*/ - #if EITHER(PREVENT_COLD_EXTRUSION, PREVENT_LENGTHY_EXTRUDE) + #if ANY(PREVENT_COLD_EXTRUSION, PREVENT_LENGTHY_EXTRUDE) if (de) { #if ENABLED(PREVENT_COLD_EXTRUSION) if (thermalManager.tooColdToExtrude(extruder)) { @@ -2131,7 +2131,7 @@ bool Planner::_populate_block( TERN_(LCD_SHOW_E_TOTAL, e_move_accumulator += steps_dist_mm.e); - #if BOTH(HAS_ROTATIONAL_AXES, INCH_MODE_SUPPORT) + #if ALL(HAS_ROTATIONAL_AXES, INCH_MODE_SUPPORT) bool cartesian_move = true; #endif @@ -2356,7 +2356,7 @@ bool Planner::_populate_block( // Example: At 120mm/s a 60mm move involving XYZ axes takes 0.5s. So this will give 2.0. // Example 2: At 120°/s a 60° move involving only rotational axes takes 0.5s. So this will give 2.0. float inverse_secs; - #if BOTH(HAS_ROTATIONAL_AXES, INCH_MODE_SUPPORT) + #if ALL(HAS_ROTATIONAL_AXES, INCH_MODE_SUPPORT) inverse_secs = inverse_millimeters * (cartesian_move ? fr_mm_s : LINEAR_UNIT(fr_mm_s)); #else inverse_secs = fr_mm_s * inverse_millimeters; @@ -2366,7 +2366,7 @@ bool Planner::_populate_block( const uint8_t moves_queued = nonbusy_movesplanned(); // Slow down when the buffer starts to empty, rather than wait at the corner for a buffer refill - #if EITHER(SLOWDOWN, HAS_WIRED_LCD) || defined(XY_FREQUENCY_LIMIT) + #if ANY(SLOWDOWN, HAS_WIRED_LCD) || defined(XY_FREQUENCY_LIMIT) // Segment time in microseconds int32_t segment_time_us = LROUND(1000000.0f / inverse_secs); #endif @@ -2963,7 +2963,7 @@ void Planner::buffer_sync_block(const BlockFlagBit sync_flag/*=BLOCK_BIT_SYNC_PO #if ENABLED(BACKLASH_COMPENSATION) LOOP_NUM_AXES(axis) block->position[axis] += backlash.get_applied_steps((AxisEnum)axis); #endif - #if BOTH(HAS_FAN, LASER_SYNCHRONOUS_M106_M107) + #if ALL(HAS_FAN, LASER_SYNCHRONOUS_M106_M107) FANS_LOOP(i) block->fan_speed[i] = thermalManager.fan_speed[i]; #endif diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index dcfdb1c28e6b..76639b4a0bae 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -1013,7 +1013,7 @@ class Planner { return target_velocity_sqr - 2 * accel * distance; } - #if EITHER(S_CURVE_ACCELERATION, LIN_ADVANCE) + #if ANY(S_CURVE_ACCELERATION, LIN_ADVANCE) /** * Calculate the speed reached given initial speed, acceleration and distance */ diff --git a/Marlin/src/module/printcounter.h b/Marlin/src/module/printcounter.h index 63cc1da158e8..ebf61a3a1ce0 100644 --- a/Marlin/src/module/printcounter.h +++ b/Marlin/src/module/printcounter.h @@ -54,7 +54,7 @@ struct printStatistics { // 16 bytes class PrintCounter: public Stopwatch { private: typedef Stopwatch super; - typedef IF::type eeprom_address_t; + typedef IF::type eeprom_address_t; static printStatistics data; diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index d4f25126b8c6..fb005baf8565 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -57,9 +57,9 @@ float largest_sensorless_adj = 0; #endif -#if EITHER(HAS_QUIET_PROBING, USE_SENSORLESS) +#if ANY(HAS_QUIET_PROBING, USE_SENSORLESS) #include "stepper/indirection.h" - #if BOTH(HAS_QUIET_PROBING, PROBING_ESTEPPERS_OFF) + #if ALL(HAS_QUIET_PROBING, PROBING_ESTEPPERS_OFF) #include "stepper.h" #endif #if USE_SENSORLESS @@ -430,7 +430,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { #endif } -#if EITHER(PREHEAT_BEFORE_PROBING, PREHEAT_BEFORE_LEVELING) +#if ANY(PREHEAT_BEFORE_PROBING, PREHEAT_BEFORE_LEVELING) #if ENABLED(PREHEAT_BEFORE_PROBING) #ifndef PROBING_NOZZLE_TEMP @@ -491,7 +491,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { void Probe::probe_error_stop() { SERIAL_ERROR_START(); SERIAL_ECHOPGM(STR_STOP_PRE); - #if EITHER(Z_PROBE_SLED, Z_PROBE_ALLEN_KEY) + #if ANY(Z_PROBE_SLED, Z_PROBE_ALLEN_KEY) SERIAL_ECHOPGM(STR_STOP_UNHOMED); #elif ENABLED(BLTOUCH) SERIAL_ECHOPGM(STR_STOP_BLTOUCH); @@ -517,7 +517,7 @@ bool Probe::set_deployed(const bool deploy) { // Make room for probe to deploy (or stow) // Fix-mounted probe should only raise for deploy // unless PAUSE_BEFORE_DEPLOY_STOW is enabled - #if EITHER(FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE) && DISABLED(PAUSE_BEFORE_DEPLOY_STOW) + #if ANY(FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE) && DISABLED(PAUSE_BEFORE_DEPLOY_STOW) const bool z_raise_wanted = deploy; #else constexpr bool z_raise_wanted = true; @@ -526,7 +526,7 @@ bool Probe::set_deployed(const bool deploy) { if (z_raise_wanted) do_z_raise(_MAX(Z_CLEARANCE_BETWEEN_PROBES, Z_CLEARANCE_DEPLOY_PROBE)); - #if EITHER(Z_PROBE_SLED, Z_PROBE_ALLEN_KEY) + #if ANY(Z_PROBE_SLED, Z_PROBE_ALLEN_KEY) if (homing_needed_error(TERN_(Z_PROBE_SLED, _BV(X_AXIS)))) { probe_error_stop(); return true; @@ -585,11 +585,11 @@ bool Probe::set_deployed(const bool deploy) { bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) { DEBUG_SECTION(log_probe, "Probe::probe_down_to_z", DEBUGGING(LEVELING)); - #if BOTH(HAS_HEATED_BED, WAIT_FOR_BED_HEATER) + #if ALL(HAS_HEATED_BED, WAIT_FOR_BED_HEATER) thermalManager.wait_for_bed_heating(); #endif - #if BOTH(HAS_TEMP_HOTEND, WAIT_FOR_HOTEND) + #if ALL(HAS_TEMP_HOTEND, WAIT_FOR_HOTEND) thermalManager.wait_for_hotend_heating(active_extruder); #endif #if ENABLED(BLTOUCH) @@ -677,7 +677,7 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) { * @return TRUE if the tare cold not be completed */ bool Probe::tare() { - #if BOTH(PROBE_ACTIVATION_SWITCH, PROBE_TARE_ONLY_WHILE_INACTIVE) + #if ALL(PROBE_ACTIVATION_SWITCH, PROBE_TARE_ONLY_WHILE_INACTIVE) if (endstops.probe_switch_activated()) { SERIAL_ECHOLNPGM("Cannot tare an active probe"); return true; diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index 5b1f7149f248..c0bb60b9956a 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -86,7 +86,7 @@ class Probe { static xyz_pos_t offset; - #if EITHER(PREHEAT_BEFORE_PROBING, PREHEAT_BEFORE_LEVELING) + #if ANY(PREHEAT_BEFORE_PROBING, PREHEAT_BEFORE_LEVELING) static void preheat_for_probing(const celsius_t hotend_temp, const celsius_t bed_temp, const bool early=false); #endif diff --git a/Marlin/src/module/scara.cpp b/Marlin/src/module/scara.cpp index 4c42ace884de..9c149670e92e 100644 --- a/Marlin/src/module/scara.cpp +++ b/Marlin/src/module/scara.cpp @@ -39,7 +39,7 @@ float segments_per_second = DEFAULT_SEGMENTS_PER_SECOND; -#if EITHER(MORGAN_SCARA, MP_SCARA) +#if ANY(MORGAN_SCARA, MP_SCARA) static constexpr xy_pos_t scara_offset = { SCARA_OFFSET_X, SCARA_OFFSET_Y }; diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index e01bd9ae600a..68dbb48da147 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -56,7 +56,7 @@ #include "../gcode/gcode.h" #include "../MarlinCore.h" -#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE) +#if ANY(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE) #include "../HAL/shared/eeprom_api.h" #endif @@ -667,7 +667,7 @@ void MarlinSettings::postprocess() { #endif } -#if BOTH(PRINTCOUNTER, EEPROM_SETTINGS) +#if ALL(PRINTCOUNTER, EEPROM_SETTINGS) #include "printcounter.h" static_assert( !WITHIN(STATS_EEPROM_ADDRESS, EEPROM_OFFSET, EEPROM_OFFSET + sizeof(SettingsData)) && @@ -711,10 +711,10 @@ void MarlinSettings::postprocess() { // This file simply uses the DEBUG_ECHO macros to implement EEPROM_CHITCHAT. // For deeper debugging of EEPROM issues enable DEBUG_EEPROM_READWRITE. // -#define DEBUG_OUT EITHER(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE) +#define DEBUG_OUT ANY(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE) #include "../core/debug_out.h" -#if BOTH(EEPROM_CHITCHAT, HOST_PROMPT_SUPPORT) +#if ALL(EEPROM_CHITCHAT, HOST_PROMPT_SUPPORT) #define HOST_EEPROM_CHITCHAT 1 #endif @@ -2726,14 +2726,14 @@ void MarlinSettings::postprocess() { bedlevel.report_state(); if (!bedlevel.sanity_check()) { - #if BOTH(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE) + #if ALL(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE) bedlevel.echo_name(); DEBUG_ECHOLNPGM(" initialized.\n"); #endif } else { eeprom_error = ERR_EEPROM_CORRUPT; - #if BOTH(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE) + #if ALL(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE) DEBUG_ECHOPGM("?Can't enable "); bedlevel.echo_name(); DEBUG_ECHOLNPGM("."); @@ -2811,7 +2811,7 @@ void MarlinSettings::postprocess() { return success; } reset(); - #if EITHER(EEPROM_AUTO_INIT, EEPROM_INIT_NOW) + #if ANY(EEPROM_AUTO_INIT, EEPROM_INIT_NOW) (void)save(); SERIAL_ECHO_MSG("EEPROM Initialized"); #endif @@ -3501,7 +3501,7 @@ void MarlinSettings::reset() { postprocess(); - #if EITHER(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE) + #if ANY(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE) FSTR_P const hdsl = F("Hardcoded Default Settings Loaded"); TERN_(HOST_EEPROM_CHITCHAT, hostui.notify(hdsl)); DEBUG_ECHO_START(); DEBUG_ECHOLNF(hdsl); @@ -3654,7 +3654,7 @@ void MarlinSettings::reset() { // // M666 Endstops Adjustment // - #if EITHER(DELTA, HAS_EXTRA_ENDSTOPS) + #if ANY(DELTA, HAS_EXTRA_ENDSTOPS) gcode.M666_report(forReplay); #endif diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 1705c60daa20..d60ce72043ac 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -143,7 +143,7 @@ Stepper stepper; // Singleton // public: -#if EITHER(HAS_EXTRA_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) +#if ANY(HAS_EXTRA_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) bool Stepper::separate_multi_axis = false; #endif @@ -177,7 +177,7 @@ bool Stepper::abort_current_block; bool Stepper::locked_Y_motor = false, Stepper::locked_Y2_motor = false; #endif -#if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) +#if ANY(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) bool Stepper::locked_Z_motor = false, Stepper::locked_Z2_motor = false #if NUM_Z_STEPPERS >= 3 , Stepper::locked_Z3_motor = false @@ -206,7 +206,7 @@ uint32_t Stepper::advance_divisor = 0, Stepper::decelerate_after, // The count at which to start decelerating Stepper::step_event_count; // The total event count for the current block -#if EITHER(HAS_MULTI_EXTRUDER, MIXING_EXTRUDER) +#if ANY(HAS_MULTI_EXTRUDER, MIXING_EXTRUDER) uint8_t Stepper::stepper_extruder; #else constexpr uint8_t Stepper::stepper_extruder; @@ -1864,7 +1864,7 @@ void Stepper::pulse_phase_isr() { PULSE_PREP(W); #endif - #if EITHER(HAS_E0_STEP, MIXING_EXTRUDER) + #if ANY(HAS_E0_STEP, MIXING_EXTRUDER) PULSE_PREP(E); #if ENABLED(LIN_ADVANCE) @@ -2422,7 +2422,7 @@ uint32_t Stepper::block_phase_isr() { * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Y or Z, handled below) * If DeltaA == DeltaB, the movement is only in the 1st axis (X) */ - #if EITHER(COREXY, COREXZ) + #if ANY(COREXY, COREXZ) #define X_CMP(A,B) ((A)==(B)) #else #define X_CMP(A,B) ((A)!=(B)) @@ -2442,7 +2442,7 @@ uint32_t Stepper::block_phase_isr() { * If DeltaA == DeltaB, the movement is only in the 1st axis (X or Y) * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Y or Z) */ - #if EITHER(COREYX, COREYZ) + #if ANY(COREYX, COREYZ) #define Y_CMP(A,B) ((A)==(B)) #else #define Y_CMP(A,B) ((A)!=(B)) @@ -2462,7 +2462,7 @@ uint32_t Stepper::block_phase_isr() { * If DeltaA == DeltaB, the movement is only in the 1st axis (X or Y, already handled above) * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Z) */ - #if EITHER(COREZX, COREZY) + #if ANY(COREZX, COREZY) #define Z_CMP(A,B) ((A)==(B)) #else #define Z_CMP(A,B) ((A)!=(B)) @@ -2719,7 +2719,7 @@ void Stepper::init() { TERN_(HAS_X2_DIR, X2_DIR_INIT()); #if HAS_Y_DIR Y_DIR_INIT(); - #if BOTH(HAS_DUAL_Y_STEPPERS, HAS_Y2_DIR) + #if ALL(HAS_DUAL_Y_STEPPERS, HAS_Y2_DIR) Y2_DIR_INIT(); #endif #endif @@ -2785,7 +2785,7 @@ void Stepper::init() { #endif X_ENABLE_INIT(); if (X_ENABLE_INIT_STATE) X_ENABLE_WRITE(X_ENABLE_INIT_STATE); - #if BOTH(HAS_X2_STEPPER, HAS_X2_ENABLE) + #if ALL(HAS_X2_STEPPER, HAS_X2_ENABLE) X2_ENABLE_INIT(); if (X_ENABLE_INIT_STATE) X2_ENABLE_WRITE(X_ENABLE_INIT_STATE); #endif @@ -2796,7 +2796,7 @@ void Stepper::init() { #endif Y_ENABLE_INIT(); if (Y_ENABLE_INIT_STATE) Y_ENABLE_WRITE(Y_ENABLE_INIT_STATE); - #if BOTH(HAS_DUAL_Y_STEPPERS, HAS_Y2_ENABLE) + #if ALL(HAS_DUAL_Y_STEPPERS, HAS_Y2_ENABLE) Y2_ENABLE_INIT(); if (Y_ENABLE_INIT_STATE) Y2_ENABLE_WRITE(Y_ENABLE_INIT_STATE); #endif diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index dcb9babde7d9..84f94cad784c 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -469,7 +469,7 @@ class Stepper { public: - #if EITHER(HAS_EXTRA_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) + #if ANY(HAS_EXTRA_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) static bool separate_multi_axis; #endif @@ -516,7 +516,7 @@ class Stepper { #if ENABLED(Y_DUAL_ENDSTOPS) static bool locked_Y_motor, locked_Y2_motor; #endif - #if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) + #if ANY(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) static bool locked_Z_motor, locked_Z2_motor #if NUM_Z_STEPPERS >= 3 , locked_Z3_motor @@ -545,7 +545,7 @@ class Stepper { decelerate_after, // The point from where we need to start decelerating step_event_count; // The total event count for the current block - #if EITHER(HAS_MULTI_EXTRUDER, MIXING_EXTRUDER) + #if ANY(HAS_MULTI_EXTRUDER, MIXING_EXTRUDER) static uint8_t stepper_extruder; #else static constexpr uint8_t stepper_extruder = 0; @@ -716,7 +716,7 @@ class Stepper { static void microstep_readings(); #endif - #if EITHER(HAS_EXTRA_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) + #if ANY(HAS_EXTRA_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) FORCE_INLINE static void set_separate_multi_axis(const bool state) { separate_multi_axis = state; } #endif #if ENABLED(X_DUAL_ENDSTOPS) @@ -727,7 +727,7 @@ class Stepper { FORCE_INLINE static void set_y_lock(const bool state) { locked_Y_motor = state; } FORCE_INLINE static void set_y2_lock(const bool state) { locked_Y2_motor = state; } #endif - #if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) + #if ANY(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) FORCE_INLINE static void set_z1_lock(const bool state) { locked_Z_motor = state; } FORCE_INLINE static void set_z2_lock(const bool state) { locked_Z2_motor = state; } #if NUM_Z_STEPPERS >= 3 diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index b3c5934b43ea..0d972384e108 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -37,7 +37,7 @@ #include "planner.h" #include "printcounter.h" -#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) +#if ANY(HAS_COOLER, LASER_COOLANT_FLOW_METER) #include "../feature/cooler.h" #include "../feature/spindle_laser.h" #endif @@ -156,7 +156,7 @@ #include "probe.h" #endif -#if EITHER(MPCTEMP, PID_EXTRUSION_SCALING) +#if ANY(MPCTEMP, PID_EXTRUSION_SCALING) #include "stepper.h" #endif @@ -368,7 +368,7 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); redundant_info_t Temperature::temp_redundant; #endif -#if EITHER(AUTO_POWER_E_FANS, HAS_FANCHECK) +#if ANY(AUTO_POWER_E_FANS, HAS_FANCHECK) uint8_t Temperature::autofan_speed[HOTENDS] = ARRAY_N_1(HOTENDS, FAN_OFF_PWM); #endif @@ -380,7 +380,7 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); uint8_t Temperature::coolerfan_speed = FAN_OFF_PWM; #endif -#if BOTH(FAN_SOFT_PWM, USE_CONTROLLER_FAN) +#if ALL(FAN_SOFT_PWM, USE_CONTROLLER_FAN) uint8_t Temperature::soft_pwm_controller_speed = FAN_OFF_PWM; #endif @@ -434,7 +434,7 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); #endif - #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) + #if ANY(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) bool Temperature::fans_paused; // = false; uint8_t Temperature::saved_fan_speed[FAN_COUNT] = ARRAY_N_1(FAN_COUNT, FAN_OFF_PWM); #endif @@ -480,7 +480,7 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); } #endif - #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) + #if ANY(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) void Temperature::set_fans_paused(const bool p) { if (p != fans_paused) { @@ -559,7 +559,7 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); #endif #endif -#if BOTH(HAS_MARLINUI_MENU, PREVENT_COLD_EXTRUSION) && E_MANUAL > 0 +#if ALL(HAS_MARLINUI_MENU, PREVENT_COLD_EXTRUSION) && E_MANUAL > 0 bool Temperature::allow_cold_extrude_override = false; #else constexpr bool Temperature::allow_cold_extrude_override; @@ -683,15 +683,15 @@ volatile bool Temperature::raw_temps_ready = false; #define ONHEATINGSTART() C_TERN(ischamber, printerEventLEDs.onChamberHeatingStart(), B_TERN(isbed, printerEventLEDs.onBedHeatingStart(), printerEventLEDs.onHotendHeatingStart())) #define ONHEATING(S,C,T) C_TERN(ischamber, printerEventLEDs.onChamberHeating(S,C,T), B_TERN(isbed, printerEventLEDs.onBedHeating(S,C,T), printerEventLEDs.onHotendHeating(S,C,T))) - #define WATCH_PID DISABLED(NO_WATCH_PID_TUNING) && (BOTH(WATCH_CHAMBER, PIDTEMPCHAMBER) || BOTH(WATCH_BED, PIDTEMPBED) || BOTH(WATCH_HOTENDS, PIDTEMP)) + #define WATCH_PID DISABLED(NO_WATCH_PID_TUNING) && (ALL(WATCH_CHAMBER, PIDTEMPCHAMBER) || ALL(WATCH_BED, PIDTEMPBED) || ALL(WATCH_HOTENDS, PIDTEMP)) #if WATCH_PID - #if BOTH(THERMAL_PROTECTION_CHAMBER, PIDTEMPCHAMBER) + #if ALL(THERMAL_PROTECTION_CHAMBER, PIDTEMPCHAMBER) #define C_GTV(T,A,B) ((T) ? (A) : (B)) #else #define C_GTV(T,A,B) (B) #endif - #if BOTH(THERMAL_PROTECTION_BED, PIDTEMPBED) + #if ALL(THERMAL_PROTECTION_BED, PIDTEMPBED) #define B_GTV(T,A,B) ((T) ? (A) : (B)) #else #define B_GTV(T,A,B) (B) @@ -823,7 +823,7 @@ volatile bool Temperature::raw_temps_ready = false; // Make sure heating is actually working #if WATCH_PID - if (BOTH(WATCH_BED, WATCH_HOTENDS) || isbed == DISABLED(WATCH_HOTENDS) || ischamber == DISABLED(WATCH_HOTENDS)) { + if (ALL(WATCH_BED, WATCH_HOTENDS) || isbed == DISABLED(WATCH_HOTENDS) || ischamber == DISABLED(WATCH_HOTENDS)) { if (!heated) { // If not yet reached target... if (current_temp > next_watch_temp) { // Over the watch temp? next_watch_temp = current_temp + watch_temp_increase; // - set the next temp to watch for @@ -858,7 +858,7 @@ volatile bool Temperature::raw_temps_ready = false; SERIAL_ECHOLNPGM(STR_PID_AUTOTUNE_FINISHED); TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_PID_AUTOTUNE_DONE))); - #if EITHER(PIDTEMPBED, PIDTEMPCHAMBER) + #if ANY(PIDTEMPBED, PIDTEMPCHAMBER) FSTR_P const estring = GHV(F("chamber"), F("bed"), FPSTR(NUL_STR)); say_default_(); SERIAL_ECHOF(estring); SERIAL_ECHOLNPGM("Kp ", tune_pid.p); say_default_(); SERIAL_ECHOF(estring); SERIAL_ECHOLNPGM("Ki ", tune_pid.i); @@ -966,7 +966,7 @@ volatile bool Temperature::raw_temps_ready = false; temp_hotend[active_extruder].target = 0.0f; temp_hotend[active_extruder].soft_pwm_amount = 0; #if HAS_FAN - set_fan_speed(EITHER(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 0); + set_fan_speed(ANY(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 0); planner.sync_fan_speeds(fan_speed); #endif @@ -984,7 +984,7 @@ volatile bool Temperature::raw_temps_ready = false; disable_all_heaters(); #if HAS_FAN zero_fan_speeds(); - set_fan_speed(EITHER(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 255); + set_fan_speed(ANY(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 255); planner.sync_fan_speeds(fan_speed); #endif const xyz_pos_t tuningpos = MPC_TUNING_POS; @@ -1011,7 +1011,7 @@ volatile bool Temperature::raw_temps_ready = false; } #if HAS_FAN - set_fan_speed(EITHER(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 0); + set_fan_speed(ANY(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 0); planner.sync_fan_speeds(fan_speed); #endif @@ -1093,7 +1093,7 @@ volatile bool Temperature::raw_temps_ready = false; total_energy_fan0 += constants.heater_power * hotend.soft_pwm_amount / 127 * MPC_dT + (last_temp - current_temp) * constants.block_heat_capacity; #if HAS_FAN else if (ELAPSED(ms, test_end_ms) && !fan0_done) { - set_fan_speed(EITHER(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 255); + set_fan_speed(ANY(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) ? 0 : active_extruder, 255); planner.sync_fan_speeds(fan_speed); settle_end_ms = ms + settle_time; test_end_ms = settle_end_ms + test_duration; @@ -1251,13 +1251,13 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { break; #endif default: - #if EITHER(AUTO_POWER_E_FANS, HAS_FANCHECK) + #if ANY(AUTO_POWER_E_FANS, HAS_FANCHECK) autofan_speed[realFan] = fan_on ? EXTRUDER_AUTO_FAN_SPEED : 0; #endif break; } - #if BOTH(HAS_FANCHECK, HAS_PWMFANCHECK) + #if ALL(HAS_FANCHECK, HAS_PWMFANCHECK) #define _AUTOFAN_SPEED() fan_check.is_measuring() ? 255 : EXTRUDER_AUTO_FAN_SPEED #else #define _AUTOFAN_SPEED() EXTRUDER_AUTO_FAN_SPEED @@ -1475,7 +1475,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id) { float ambient_xfer_coeff = constants.ambient_xfer_coeff_fan0; #if ENABLED(MPC_INCLUDE_FAN) - const uint8_t fan_index = EITHER(MPC_FAN_0_ACTIVE_HOTEND, MPC_FAN_0_ALL_HOTENDS) ? 0 : ee; + const uint8_t fan_index = ANY(MPC_FAN_0_ACTIVE_HOTEND, MPC_FAN_0_ALL_HOTENDS) ? 0 : ee; const float fan_fraction = TERN_(MPC_FAN_0_ACTIVE_HOTEND, !this_hotend ? 0.0f : ) fan_speed[fan_index] * RECIPROCAL(255); ambient_xfer_coeff += fan_fraction * constants.fan255_adjustment; #endif @@ -1623,7 +1623,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id) { } #endif // WATCH_BED - #if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING) + #if ALL(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING) #define PAUSE_CHANGE_REQD 1 #endif @@ -1706,11 +1706,11 @@ void Temperature::mintemp_error(const heater_id_t heater_id) { } #endif - #if EITHER(CHAMBER_FAN, CHAMBER_VENT) || DISABLED(PIDTEMPCHAMBER) + #if ANY(CHAMBER_FAN, CHAMBER_VENT) || DISABLED(PIDTEMPCHAMBER) static bool flag_chamber_excess_heat; // = false; #endif - #if EITHER(CHAMBER_FAN, CHAMBER_VENT) + #if ANY(CHAMBER_FAN, CHAMBER_VENT) static bool flag_chamber_off; // = false if (temp_chamber.target > CHAMBER_MINTEMP) { @@ -2460,17 +2460,17 @@ void Temperature::updateTemperaturesFromRawValues() { if (temp_bed.target > 0 && TP_CMP(BED, mintemp_raw_BED, temp_bed.getraw())) mintemp_error(H_BED); #endif - #if BOTH(HAS_HEATED_CHAMBER, THERMAL_PROTECTION_CHAMBER) + #if ALL(HAS_HEATED_CHAMBER, THERMAL_PROTECTION_CHAMBER) if (TP_CMP(CHAMBER, temp_chamber.getraw(), maxtemp_raw_CHAMBER)) maxtemp_error(H_CHAMBER); if (temp_chamber.target > 0 && TP_CMP(CHAMBER, mintemp_raw_CHAMBER, temp_chamber.getraw())) mintemp_error(H_CHAMBER); #endif - #if BOTH(HAS_COOLER, THERMAL_PROTECTION_COOLER) + #if ALL(HAS_COOLER, THERMAL_PROTECTION_COOLER) if (cutter.unitPower > 0 && TP_CMP(COOLER, temp_cooler.getraw(), maxtemp_raw_COOLER)) maxtemp_error(H_COOLER); if (TP_CMP(COOLER, mintemp_raw_COOLER, temp_cooler.getraw())) mintemp_error(H_COOLER); #endif - #if BOTH(HAS_TEMP_BOARD, THERMAL_PROTECTION_BOARD) + #if ALL(HAS_TEMP_BOARD, THERMAL_PROTECTION_BOARD) if (TP_CMP(BOARD, temp_board.getraw(), maxtemp_raw_BOARD)) maxtemp_error(H_BOARD); if (TP_CMP(BOARD, mintemp_raw_BOARD, temp_board.getraw())) mintemp_error(H_BOARD); #endif @@ -2820,7 +2820,7 @@ void Temperature::init() { while (analog_to_celsius_cooler(maxtemp_raw_COOLER) < COOLER_MAXTEMP) maxtemp_raw_COOLER -= TEMPDIR(COOLER) * (OVERSAMPLENR); #endif - #if BOTH(HAS_TEMP_BOARD, THERMAL_PROTECTION_BOARD) + #if ALL(HAS_TEMP_BOARD, THERMAL_PROTECTION_BOARD) while (analog_to_celsius_board(mintemp_raw_BOARD) < BOARD_MINTEMP) mintemp_raw_BOARD += TEMPDIR(BOARD) * (OVERSAMPLENR); while (analog_to_celsius_board(maxtemp_raw_BOARD) > BOARD_MAXTEMP) maxtemp_raw_BOARD -= TEMPDIR(BOARD) * (OVERSAMPLENR); #endif @@ -3064,7 +3064,7 @@ void Temperature::disable_all_heaters() { #endif // PROBING_HEATERS_OFF -#if EITHER(SINGLENOZZLE_STANDBY_TEMP, SINGLENOZZLE_STANDBY_FAN) +#if ANY(SINGLENOZZLE_STANDBY_TEMP, SINGLENOZZLE_STANDBY_FAN) void Temperature::singlenozzle_change(const uint8_t old_tool, const uint8_t new_tool) { #if ENABLED(SINGLENOZZLE_STANDBY_FAN) @@ -3431,7 +3431,7 @@ void Temperature::isr() { static SoftPWM soft_pwm_cooler; #endif - #if BOTH(FAN_SOFT_PWM, USE_CONTROLLER_FAN) + #if ALL(FAN_SOFT_PWM, USE_CONTROLLER_FAN) static SoftPWM soft_pwm_controller; #endif diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index bd67785383b0..ab25b9b3d236 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -354,7 +354,7 @@ typedef struct { float p, i, d, c, f; } raw_pidcf_t; }; typedef - #if BOTH(PID_EXTRUSION_SCALING, PID_FAN_SCALING) + #if ALL(PID_EXTRUSION_SCALING, PID_FAN_SCALING) PIDCF_t<0, PID_MAX, LPQ_MAX_LEN, PID_FAN_SCALING_MIN_SPEED, PID_FAN_SCALING_LIN_FACTOR> #elif ENABLED(PID_EXTRUSION_SCALING) PIDC_t<0, PID_MAX, LPQ_MAX_LEN> @@ -388,7 +388,7 @@ typedef struct { float p, i, d, c, f; } raw_pidcf_t; #endif -#if ENABLED(G26_MESH_VALIDATION) && EITHER(HAS_MARLINUI_MENU, EXTENSIBLE_UI) +#if ENABLED(G26_MESH_VALIDATION) && ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI) #define G26_CLICK_CAN_CANCEL 1 #endif @@ -462,7 +462,7 @@ struct PIDHeaterInfo : public HeaterInfo { #if HAS_TEMP_PROBE typedef temp_info_t probe_info_t; #endif -#if EITHER(HAS_COOLER, HAS_TEMP_COOLER) +#if ANY(HAS_COOLER, HAS_TEMP_COOLER) typedef heater_info_t cooler_info_t; #endif #if HAS_TEMP_BOARD @@ -599,7 +599,7 @@ class Temperature { static redundant_info_t temp_redundant; #endif - #if EITHER(AUTO_POWER_E_FANS, HAS_FANCHECK) + #if ANY(AUTO_POWER_E_FANS, HAS_FANCHECK) static uint8_t autofan_speed[HOTENDS]; #endif #if ENABLED(AUTO_POWER_CHAMBER_FAN) @@ -614,11 +614,11 @@ class Temperature { soft_pwm_count_fan[FAN_COUNT]; #endif - #if BOTH(FAN_SOFT_PWM, USE_CONTROLLER_FAN) + #if ALL(FAN_SOFT_PWM, USE_CONTROLLER_FAN) static uint8_t soft_pwm_controller_speed; #endif - #if BOTH(HAS_MARLINUI_MENU, PREVENT_COLD_EXTRUSION) && E_MANUAL > 0 + #if ALL(HAS_MARLINUI_MENU, PREVENT_COLD_EXTRUSION) && E_MANUAL > 0 static bool allow_cold_extrude_override; static void set_menu_cold_override(const bool allow) { allow_cold_extrude_override = allow; } #else @@ -640,7 +640,7 @@ class Temperature { static bool hotEnoughToExtrude(const uint8_t e) { return !tooColdToExtrude(e); } static bool targetHotEnoughToExtrude(const uint8_t e) { return !targetTooColdToExtrude(e); } - #if EITHER(SINGLENOZZLE_STANDBY_TEMP, SINGLENOZZLE_STANDBY_FAN) + #if ANY(SINGLENOZZLE_STANDBY_TEMP, SINGLENOZZLE_STANDBY_FAN) #if ENABLED(SINGLENOZZLE_STANDBY_TEMP) static celsius_t singlenozzle_temp[EXTRUDERS]; #endif @@ -855,7 +855,7 @@ class Temperature { static void report_fan_speed(const uint8_t fan); #endif - #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) + #if ANY(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) static bool fans_paused; static uint8_t saved_fan_speed[FAN_COUNT]; #endif @@ -883,7 +883,7 @@ class Temperature { static void set_temp_fan_speed(const uint8_t fan, const uint16_t command_or_speed); #endif - #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) + #if ANY(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) void set_fans_paused(const bool p); #endif diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 5c831c74124d..02bd4bb1bb33 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -49,7 +49,7 @@ Flags toolchange_extruder_ready; #endif -#if EITHER(MAGNETIC_PARKING_EXTRUDER, TOOL_SENSOR) \ +#if ANY(MAGNETIC_PARKING_EXTRUDER, TOOL_SENSOR) \ || defined(EVENT_GCODE_TOOLCHANGE_T0) || defined(EVENT_GCODE_TOOLCHANGE_T1) || defined(EVENT_GCODE_AFTER_TOOLCHANGE) \ || (ENABLED(PARKING_EXTRUDER) && PARKING_EXTRUDER_SOLENOIDS_DELAY > 0) #include "../gcode/gcode.h" @@ -1173,7 +1173,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { if (new_tool != old_tool || TERN0(PARKING_EXTRUDER, extruder_parked)) { // PARKING_EXTRUDER may need to attach old_tool when homing destination = current_position; - #if BOTH(TOOLCHANGE_FILAMENT_SWAP, HAS_FAN) && TOOLCHANGE_FS_FAN >= 0 + #if ALL(TOOLCHANGE_FILAMENT_SWAP, HAS_FAN) && TOOLCHANGE_FS_FAN >= 0 // Store and stop fan. Restored on any exit. REMEMBER(fan, thermalManager.fan_speed[TOOLCHANGE_FS_FAN], 0); #endif @@ -1311,7 +1311,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { const bool should_move = safe_to_move && !no_move && IsRunning(); if (should_move) { - #if EITHER(SINGLENOZZLE_STANDBY_TEMP, SINGLENOZZLE_STANDBY_FAN) + #if ANY(SINGLENOZZLE_STANDBY_TEMP, SINGLENOZZLE_STANDBY_FAN) thermalManager.singlenozzle_change(old_tool, new_tool); #endif diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index 37ce4ee94e56..bdddf80321ef 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -179,7 +179,7 @@ #if SD_CONNECTION_IS(ONBOARD) #define FORCE_SOFT_SPI #endif - #if BOTH(MKS_MINI_12864_V3, SDSUPPORT) + #if ALL(MKS_MINI_12864_V3, SDSUPPORT) #define PAUSE_LCD_FOR_BUSY_SD #endif #else diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index 3616b7a27c43..3b5f6b7c7690 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -479,7 +479,7 @@ #define LCD_PINS_ENABLE 51 // SID (MOSI) #define LCD_PINS_D4 52 // SCK (CLK) clock - #elif BOTH(IS_NEWPANEL, PANEL_ONE) + #elif ALL(IS_NEWPANEL, PANEL_ONE) #define LCD_PINS_RS 40 #define LCD_PINS_ENABLE 42 @@ -511,7 +511,7 @@ #else - #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) + #if ANY(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 @@ -595,7 +595,7 @@ #define LCD_SDSS SDSS #define SD_DETECT_PIN 49 - #elif EITHER(VIKI2, miniVIKI) + #elif ANY(VIKI2, miniVIKI) #define DOGLCD_CS 45 #define DOGLCD_A0 44 diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h index 217e270b9caa..f58028d13d71 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h @@ -132,7 +132,7 @@ #define LCD_PINS_ENABLE P0_18 // (MOSI) EXP1-3 #define LCD_PINS_D4 P0_15 // (SCK) EXP1-5 - #if BOTH(HAS_MARLINUI_HD44780, IS_RRD_SC) + #if ALL(HAS_MARLINUI_HD44780, IS_RRD_SC) #error "REPRAP_DISCOUNT_SMART_CONTROLLER displays aren't supported by the BIQU B300 v1.0" #endif diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h index 2c0d52ef9a10..08af913bbf94 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h @@ -107,7 +107,7 @@ #define LCD_PINS_ENABLE P0_18 // (MOSI) EXP1-3 #define LCD_PINS_D4 P0_15 // (SCK) EXP1-5 - #if BOTH(HAS_MARLINUI_HD44780, IS_RRD_SC) + #if ALL(HAS_MARLINUI_HD44780, IS_RRD_SC) #error "REPRAP_DISCOUNT_SMART_CONTROLLER displays aren't supported by the BIQU BQ111-A4" #endif diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index 6653a94f8059..e1d1842a57c9 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -406,7 +406,7 @@ #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 667b0fa949c3..c440acf025a2 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -449,7 +449,7 @@ #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index ec74cc640e85..ed9815b9aee1 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -27,8 +27,8 @@ // https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT //#define BTT_MOTOR_EXPANSION -#if BOTH(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) - #if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) +#if ALL(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) + #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define EXP_MOT_USE_EXP2_ONLY 1 #else #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time." diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index 1c300cbcdb0f..c77f6ecbffa7 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -240,7 +240,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 EITHER(VIKI2, miniVIKI) + #if ANY(VIKI2, miniVIKI) #define DOGLCD_SCK SD_SCK_PIN #define DOGLCD_MOSI SD_MOSI_PIN #endif @@ -265,7 +265,7 @@ //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems // results in LCD soft SPI mode 3, SD soft SPI mode 0 - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN P2_12 // J8-4 (LCD_D6 on FYSETC schematic) #endif diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index cdbc6d154fce..dc2305c79411 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -370,7 +370,7 @@ #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index 28d8d3cfb5ef..8a3566099169 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -207,9 +207,9 @@ #endif #ifndef FAN_PIN - #if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan + #if ANY(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan #define FAN_PIN MOSFET_B_PIN - #elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan + #elif ANY(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan #define FAN_PIN MOSFET_C_PIN #elif FET_ORDER_EEB // Hotend, Hotend, Bed #define FAN_PIN P1_18 // (4) IO pin. Buffer needed @@ -353,7 +353,7 @@ //#define SHIFT_EN_PIN P1_22 // (41) J5-4 & AUX-4 #endif - #if EITHER(VIKI2, miniVIKI) + #if ANY(VIKI2, miniVIKI) #define DOGLCD_CS P0_16 // (16) #define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2 #define DOGLCD_SCK P0_15 // (52) (SCK) J3-9 & AUX-3 @@ -378,7 +378,7 @@ #define LCD_RESET_PIN P0_16 // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN P1_00 #endif diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h index a9c61cb8c9e6..eab572bb4c1f 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h @@ -109,7 +109,7 @@ // Display // -#if EITHER(VIKI2, miniVIKI) +#if ANY(VIKI2, miniVIKI) #define BEEPER_PIN P1_31 #define DOGLCD_A0 P2_06 #define DOGLCD_CS P0_16 diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h index eabb338504f8..8ecd3d695a60 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -158,7 +158,7 @@ //#define SHIFT_EN_PIN P1_22 // (41) J5-4 & AUX-4 #endif - #if EITHER(VIKI2, miniVIKI) + #if ANY(VIKI2, miniVIKI) #define BEEPER_PIN P1_30 // (37) may change if cable changes #define DOGLCD_CS P0_26 // (63) J5-3 & AUX-2 #define DOGLCD_SCK SD_SCK_PIN diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index d9f56407e294..b65853298d23 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -254,7 +254,7 @@ #define LCD_PINS_D7 EXP1_01_PIN #define ADC_KEYPAD_PIN P1_23 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! - #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) + #elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h index e25a6688990a..fc59498bd641 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -192,7 +192,7 @@ // A custom EXP1 cable is required colored LEDs. Pins 1-5, 9, 10 of the cable go to pins 1-5, 9, 10 // on the board's EXP1 connector. Pins 6, 7, and 8 of the EXP1 cable go to the Ethernet connector. // Rev 1.2 displays do NOT require the RGB LEDs. 2.0 and 2.1 displays do require RGB. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN P1_16 // EXP1-6 => Ethernet pin 6 (top row, 3 from left) #endif diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index cf3b884683a9..bcab1ca2df94 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -388,7 +388,7 @@ #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h index 124c8f63c2e8..32aa9e0e49ff 100644 --- a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h @@ -93,7 +93,7 @@ // // LCD / Controller // -#if EITHER(VIKI2, miniVIKI) +#if ANY(VIKI2, miniVIKI) #define BEEPER_PIN P1_31 #define DOGLCD_A0 P2_11 diff --git a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h index f39b0374c28a..e72078854998 100644 --- a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h @@ -214,7 +214,7 @@ #endif -#if EITHER(CR10_STOCKDISPLAY, MKS_MINI_12864) +#if ANY(CR10_STOCKDISPLAY, MKS_MINI_12864) #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN #define BTN_ENC EXP1_02_PIN diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index bdfc2b7b1745..7fa4be39239b 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -61,7 +61,7 @@ #endif #endif -#if !(BOTH(HAS_WIRED_LCD, IS_NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, WYH_L12864, MINIPANEL, REPRAPWORLD_KEYPAD)) +#if !(ALL(HAS_WIRED_LCD, IS_NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, WYH_L12864, MINIPANEL, REPRAPWORLD_KEYPAD)) #define HAS_FREE_AUX2_PINS 1 #endif diff --git a/Marlin/src/pins/pinsDebug.h b/Marlin/src/pins/pinsDebug.h index 56e1039c4eed..14d85d9cb224 100644 --- a/Marlin/src/pins/pinsDebug.h +++ b/Marlin/src/pins/pinsDebug.h @@ -100,7 +100,7 @@ const PinInfo pin_array[] PROGMEM = { */ #if SERIAL_IN_USE(0) - #if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) + #if ANY(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) { RXD_NAME_0, 0, true }, { TXD_NAME_0, 1, true }, #elif AVR_ATmega1284_FAMILY @@ -113,7 +113,7 @@ const PinInfo pin_array[] PROGMEM = { #endif #if SERIAL_IN_USE(1) - #if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) + #if ANY(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) { RXD_NAME_1, 19, true }, { TXD_NAME_1, 18, true }, #elif AVR_ATmega1284_FAMILY @@ -131,7 +131,7 @@ const PinInfo pin_array[] PROGMEM = { #endif #if SERIAL_IN_USE(2) - #if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) + #if ANY(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) { RXD_NAME_2, 17, true }, { TXD_NAME_2, 16, true }, #elif defined(TARGET_LPC1768) @@ -146,7 +146,7 @@ const PinInfo pin_array[] PROGMEM = { #endif #if SERIAL_IN_USE(3) - #if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) + #if ANY(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) { RXD_NAME_3, 15, true }, { TXD_NAME_3, 14, true }, #elif defined(TARGET_LPC1768) diff --git a/Marlin/src/pins/rambo/pins_RAMBO.h b/Marlin/src/pins/rambo/pins_RAMBO.h index 3a26811538c9..3ab367bcc106 100644 --- a/Marlin/src/pins/rambo/pins_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_RAMBO.h @@ -210,7 +210,7 @@ #define LCD_PINS_D6 74 #define LCD_PINS_D7 75 - #if EITHER(VIKI2, 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 diff --git a/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h b/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h index ca073f5ab991..c1df215419a2 100644 --- a/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h +++ b/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h @@ -143,7 +143,7 @@ #define HOME_PIN BTN_HOME -#if EITHER(VIKI2, miniVIKI) +#if ANY(VIKI2, miniVIKI) #define BEEPER_PIN 44 // Pins for DOGM SPI LCD Support #define DOGLCD_A0 70 diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h index 9929fa6e12a8..707d5aa43ebe 100644 --- a/Marlin/src/pins/ramps/pins_3DRAG.h +++ b/Marlin/src/pins/ramps/pins_3DRAG.h @@ -117,7 +117,7 @@ #define SPINDLE_LASER_PWM_PIN 46 // Hardware PWM #define SPINDLE_LASER_ENA_PIN 62 // Pullup! #define SPINDLE_DIR_PIN 48 - #elif !BOTH(HAS_WIRED_LCD, IS_NEWPANEL) // Use expansion header if no LCD in use + #elif !ALL(HAS_WIRED_LCD, IS_NEWPANEL) // Use expansion header if no LCD in use #define SPINDLE_LASER_ENA_PIN 16 // Pullup or pulldown! #define SPINDLE_DIR_PIN 17 #if !NUM_SERVOS // Use servo connector if possible diff --git a/Marlin/src/pins/ramps/pins_AZTEEG_X3.h b/Marlin/src/pins/ramps/pins_AZTEEG_X3.h index 4d3722655df9..17581dca6241 100644 --- a/Marlin/src/pins/ramps/pins_AZTEEG_X3.h +++ b/Marlin/src/pins/ramps/pins_AZTEEG_X3.h @@ -54,7 +54,7 @@ #undef STAT_LED_RED_PIN #undef STAT_LED_BLUE_PIN -#if EITHER(VIKI2, miniVIKI) +#if ANY(VIKI2, miniVIKI) #undef DOGLCD_A0 #undef DOGLCD_CS diff --git a/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h b/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h index 2c666a6f16a4..dfde1e59eda1 100644 --- a/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h +++ b/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h @@ -145,7 +145,7 @@ #undef BEEPER_PIN #define BEEPER_PIN 33 -#if EITHER(VIKI2, miniVIKI) +#if ANY(VIKI2, miniVIKI) #undef SD_DETECT_PIN #define SD_DETECT_PIN 49 // For easy adapter board #undef BEEPER_PIN @@ -172,7 +172,7 @@ #undef SPINDLE_DIR_PIN #if HAS_CUTTER // EXP2 header - #if EITHER(VIKI2, miniVIKI) + #if ANY(VIKI2, miniVIKI) #define BTN_EN2 31 // Pin 7 needed for Spindle PWM #endif #define SPINDLE_LASER_PWM_PIN 7 // Hardware PWM diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h index 9f23647c42b2..8a590568147f 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h @@ -249,7 +249,7 @@ #define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. // Seems to work best if left open. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN 25 #endif diff --git a/Marlin/src/pins/ramps/pins_K8400.h b/Marlin/src/pins/ramps/pins_K8400.h index 56ec66191b32..bcb145825b24 100644 --- a/Marlin/src/pins/ramps/pins_K8400.h +++ b/Marlin/src/pins/ramps/pins_K8400.h @@ -53,7 +53,7 @@ #define X_STOP_PIN 3 #define Y_STOP_PIN 14 -#if EITHER(BLTOUCH, TOUCH_MI_PROBE) +#if ANY(BLTOUCH, TOUCH_MI_PROBE) #define INVERTED_PROBE_STATE #endif diff --git a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h index d9759153c334..18de3830f3be 100644 --- a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h +++ b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h @@ -127,7 +127,7 @@ // Aux-1 | D19 D18 GND 5V | J21 | D4 D5 D6 GND | J17 | D11 GND 24V | J18 | D7 GND 5V | // ------------------ ---------------- --------------- ------------- -#if BOTH(CR10_STOCKDISPLAY, LONGER_LK5) +#if ALL(CR10_STOCKDISPLAY, LONGER_LK5) /** CR-10 Stock Display * ------ * GND | 9 10 | 5V diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h index 5c13288f8558..1cd232ff121c 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h @@ -65,7 +65,7 @@ // // LCD / Controller // -#if EITHER(VIKI2, miniVIKI) +#if ANY(VIKI2, miniVIKI) /** * VIKI2 Has two groups of wires with... * diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 3d4e0426f6ad..6749f5a14c0b 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -250,7 +250,7 @@ #ifndef HEATER_BED_PIN #define HEATER_BED_PIN MOSFET_C_PIN #endif - #if EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) + #if ANY(HAS_MULTI_HOTEND, HEATERS_PARALLEL) #define HEATER_1_PIN MOSFET_D_PIN #else #define FAN1_PIN MOSFET_D_PIN @@ -258,9 +258,9 @@ #endif #ifndef FAN_PIN - #if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan + #if ANY(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan #define FAN_PIN MOSFET_B_PIN - #elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan + #elif ANY(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan #define FAN_PIN MOSFET_C_PIN #elif FET_ORDER_EEB // Hotend, Hotend, Bed #define FAN_PIN 4 // IO pin. Buffer needed @@ -568,7 +568,7 @@ #define EXP1_01_PIN AUX4_09_PIN #define EXP1_02_PIN AUX4_10_PIN - #if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) + #if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #define EXP2_03_PIN AUX4_11_PIN #define EXP2_05_PIN AUX4_12_PIN #define EXP2_08_PIN -1 // RESET @@ -599,7 +599,7 @@ #define LCD_PINS_ENABLE EXP2_06_PIN // SID (MOSI) #define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock - #elif BOTH(IS_NEWPANEL, PANEL_ONE) + #elif ALL(IS_NEWPANEL, PANEL_ONE) #define LCD_PINS_RS AUX2_06_PIN #define LCD_PINS_ENABLE AUX2_08_PIN @@ -643,7 +643,7 @@ #else - #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) + #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) #define LCD_PINS_DC EXP1_06_PIN // Set as output on init #define LCD_PINS_RS EXP1_07_PIN // Pull low for 1s to init // DOGM SPI LCD Support @@ -737,7 +737,7 @@ #define SD_DETECT_PIN EXP2_07_PIN #endif - #elif EITHER(VIKI2, miniVIKI) + #elif ANY(VIKI2, miniVIKI) #define DOGLCD_CS AUX4_05_PIN #define DOGLCD_A0 AUX2_07_PIN @@ -778,7 +778,7 @@ #endif #define KILL_PIN EXP2_08_PIN - #elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864) + #elif ANY(MKS_MINI_12864, FYSETC_MINI_12864) #define BTN_ENC EXP1_02_PIN #ifndef SD_DETECT_PIN @@ -815,7 +815,7 @@ #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif @@ -915,7 +915,7 @@ #endif #endif -#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) +#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_RAMPS.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" diff --git a/Marlin/src/pins/ramps/pins_RUMBA.h b/Marlin/src/pins/ramps/pins_RUMBA.h index 6b1f4c569170..dacc1ac73e02 100644 --- a/Marlin/src/pins/ramps/pins_RUMBA.h +++ b/Marlin/src/pins/ramps/pins_RUMBA.h @@ -193,7 +193,7 @@ // // LCD / Controller // -#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) +#if ANY(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 @@ -212,7 +212,7 @@ #define LCD_RESET_PIN 18 // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN 41 #endif diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h index ce2a9e4cdc72..1c40dd19d409 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h @@ -114,7 +114,7 @@ #if ENABLED(ANYCUBIC_4_MAX_PRO_ENDSTOPS) #define X_MAX_PIN 43 // AUX (2) #define Y_STOP_PIN 19 // Z+ -#elif EITHER(TRIGORILLA_MAPPING_CHIRON, TRIGORILLA_MAPPING_I3MEGA) +#elif ANY(TRIGORILLA_MAPPING_CHIRON, TRIGORILLA_MAPPING_I3MEGA) // Chiron uses AUX header for Y and Z endstops #define Y_STOP_PIN 42 // AUX (1) #define Z_STOP_PIN 43 // AUX (2) @@ -142,7 +142,7 @@ #define FIL_RUNOUT_PIN 19 // Z+ #endif - #if EITHER(TRIGORILLA_MAPPING_CHIRON, SWAP_Z_MOTORS) + #if ANY(TRIGORILLA_MAPPING_CHIRON, SWAP_Z_MOTORS) // Chiron and some Anycubic i3 MEGAs swap Z steppers #define Z_STEP_PIN 36 #define Z_DIR_PIN 34 @@ -156,7 +156,7 @@ #endif #endif -#if EITHER(ANYCUBIC_LCD_CHIRON, ANYCUBIC_LCD_I3MEGA) +#if ANY(ANYCUBIC_LCD_CHIRON, ANYCUBIC_LCD_I3MEGA) #ifndef BEEPER_PIN #define BEEPER_PIN EXP2_03_PIN // Chiron Standard Adapter #endif diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index 430d7b3ec06b..54753a7fd677 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -281,7 +281,7 @@ #define LCD_PINS_ENABLE 51 // SID (MOSI) #define LCD_PINS_D4 52 // SCK (CLK) clock - #elif BOTH(IS_NEWPANEL, PANEL_ONE) + #elif ALL(IS_NEWPANEL, PANEL_ONE) #define LCD_PINS_RS 40 #define LCD_PINS_ENABLE 42 @@ -314,7 +314,7 @@ #else - #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) + #if ANY(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 @@ -402,7 +402,7 @@ #define LCD_SDSS 53 #define SD_DETECT_PIN 49 - #elif EITHER(VIKI2, miniVIKI) + #elif ANY(VIKI2, miniVIKI) #define DOGLCD_CS 45 #define DOGLCD_A0 44 diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h index 25cc278adab8..5c1e2dcd8fca 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h @@ -116,7 +116,7 @@ // // Z Probe (when not Z_MIN_PIN) // -#if !defined(Z_MIN_PROBE_PIN) && !BOTH(HAS_CUTTER, BOARD_REV_1_0) +#if !defined(Z_MIN_PROBE_PIN) && !ALL(HAS_CUTTER, BOARD_REV_1_0) #define Z_MIN_PROBE_PIN Z_MAX_PIN #endif @@ -135,7 +135,7 @@ #define Z_DIR_PIN 39 #define Z_ENABLE_PIN 35 -#if BOTH(HAS_CUTTER, BOARD_REV_1_1_TO_1_3) && EXTRUDERS == 1 +#if ALL(HAS_CUTTER, BOARD_REV_1_1_TO_1_3) && EXTRUDERS == 1 // Move E0 to the spare and get Spindle/Laser signals from E0 #define E0_STEP_PIN 49 #define E0_DIR_PIN 47 @@ -166,7 +166,7 @@ // // LCD / Controller // -#if EITHER(BOARD_REV_1_0, 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 @@ -175,7 +175,7 @@ #define LCD_PINS_D6 32 #define LCD_PINS_D7 30 -#elif BOTH(BOARD_REV_1_5, HAS_WIRED_LCD) +#elif ALL(BOARD_REV_1_5, HAS_WIRED_LCD) #define BEEPER_PIN 18 @@ -225,7 +225,7 @@ // M3/M4/M5 - Spindle/Laser Control // #if HAS_CUTTER - #if EITHER(BOARD_REV_1_0, BOARD_REV_1_5) // Use the last three SW positions + #if ANY(BOARD_REV_1_0, BOARD_REV_1_5) // Use the last three SW positions #define SPINDLE_DIR_PIN 10 // 1.0: SW4 1.5: EXP3-6 ("10") #define SPINDLE_LASER_PWM_PIN 9 // 1.0: SW5 1.5: EXP3-7 ( "9") .. MUST BE HARDWARE PWM #define SPINDLE_LASER_ENA_PIN 8 // 1.0: SW6 1.5: EXP3-8 ( "8") .. Pin should have a pullup! diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V53.h b/Marlin/src/pins/ramps/pins_ZRIB_V53.h index 050516791e40..59916c8ad2cc 100644 --- a/Marlin/src/pins/ramps/pins_ZRIB_V53.h +++ b/Marlin/src/pins/ramps/pins_ZRIB_V53.h @@ -361,7 +361,7 @@ // OLED 128x64 //================================================================================ -#if EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) +#if ANY(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) #define LCDSCREEN_NAME "ZONESTAR 12864OLED" #define LCD_SDSS 16 #define LCD_PINS_RS 23 // RESET Pull low for 1s to init @@ -372,7 +372,7 @@ #define BTN_ENC 29 #define BEEPER_PIN -1 #define KILL_PIN -1 - #if EITHER(OLED_HW_IIC, OLED_HW_SPI) + #if ANY(OLED_HW_IIC, OLED_HW_SPI) #error "Oops! You must choose SW SPI for ZRIB V53 board and connect the OLED screen to EXP1 connector." #else // SW_SPI #define DOGLCD_A0 LCD_PINS_DC diff --git a/Marlin/src/pins/sam/env_validate.h b/Marlin/src/pins/sam/env_validate.h index 09bcd1364921..b1976075e2e4 100644 --- a/Marlin/src/pins/sam/env_validate.h +++ b/Marlin/src/pins/sam/env_validate.h @@ -21,7 +21,7 @@ */ #pragma once -#if BOTH(ALLOW_MEGA1280, ALLOW_MEGA2560) && NOT_TARGET(__SAM3X8E__, __AVR_ATmega1280__, __AVR_ATmega2560__) +#if ALL(ALLOW_MEGA1280, ALLOW_MEGA2560) && NOT_TARGET(__SAM3X8E__, __AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino Due or Mega' in 'Tools > Board.'" #elif ENABLED(ALLOW_MEGA2560) && NOT_TARGET(__SAM3X8E__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino Due or Mega' in 'Tools > Board.'" diff --git a/Marlin/src/pins/sam/pins_KRATOS32.h b/Marlin/src/pins/sam/pins_KRATOS32.h index f7867f9b2607..7451df9580b8 100644 --- a/Marlin/src/pins/sam/pins_KRATOS32.h +++ b/Marlin/src/pins/sam/pins_KRATOS32.h @@ -32,7 +32,7 @@ // // EEPROM // -#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) +#if ANY(NO_EEPROM_SELECTED, I2C_EEPROM) #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1F400 // 16K #endif diff --git a/Marlin/src/pins/sam/pins_RADDS.h b/Marlin/src/pins/sam/pins_RADDS.h index af24014614c1..5b887f2d57bd 100644 --- a/Marlin/src/pins/sam/pins_RADDS.h +++ b/Marlin/src/pins/sam/pins_RADDS.h @@ -32,7 +32,7 @@ // // EEPROM // -#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) +#if ANY(NO_EEPROM_SELECTED, I2C_EEPROM) #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x2000 // 8K #endif diff --git a/Marlin/src/pins/sam/pins_RAMPS_DUO.h b/Marlin/src/pins/sam/pins_RAMPS_DUO.h index 5b2b2f0b6615..3752d53a051e 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_DUO.h +++ b/Marlin/src/pins/sam/pins_RAMPS_DUO.h @@ -73,7 +73,7 @@ // #if HAS_WIRED_LCD - #if BOTH(IS_NEWPANEL, PANEL_ONE) + #if ALL(IS_NEWPANEL, PANEL_ONE) #undef LCD_PINS_D4 #define LCD_PINS_D4 68 diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h index 00eba994a8d9..347f6e68466f 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h @@ -189,7 +189,7 @@ #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_05_PIN #endif @@ -217,7 +217,7 @@ #endif - #if EITHER(VIKI2, miniVIKI) + #if ANY(VIKI2, miniVIKI) #define DOGLCD_A0 EXP1_07_PIN #define KILL_PIN 51 #define STAT_LED_BLUE_PIN EXP1_03_PIN diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index 35279bf2e513..c9612644a55c 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -227,7 +227,7 @@ #define SD_DETECT_PIN EXP2_07_PIN #endif - #if EITHER(RADDS_DISPLAY, IS_RRD_SC) + #if ANY(RADDS_DISPLAY, IS_RRD_SC) #define LCD_PINS_RS EXP1_04_PIN #define LCD_PINS_ENABLE EXP1_03_PIN @@ -254,7 +254,7 @@ #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN // D5 #endif diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index 78cf3f6e1065..5b3dba686560 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -217,7 +217,7 @@ #define SD_DETECT_PIN EXP2_07_PIN #endif - #if EITHER(RADDS_DISPLAY, IS_RRD_SC) + #if ANY(RADDS_DISPLAY, IS_RRD_SC) #define LCD_PINS_RS EXP1_04_PIN #define LCD_PINS_ENABLE EXP1_03_PIN @@ -244,7 +244,7 @@ #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN // D5 #endif diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h index 9901b78c4663..d3977b446f0a 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h @@ -238,7 +238,7 @@ //#define LCD_PINS_ENABLE EXP2_06_PIN // SID (MOSI) //#define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock - #elif BOTH(IS_NEWPANEL, PANEL_ONE) + #elif ALL(IS_NEWPANEL, PANEL_ONE) // TO TEST //#define LCD_PINS_RS EXP1_02_PIN @@ -274,7 +274,7 @@ #else - #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) + #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) // TO TEST //#define LCD_PINS_DC 25 // Set as output on init //#define LCD_PINS_RS 27 // Pull low for 1s to init @@ -373,7 +373,7 @@ //#define LCD_SDSS SDSS //#define SD_DETECT_PIN EXP2_10_PIN - #elif EITHER(VIKI2, miniVIKI) + #elif ANY(VIKI2, miniVIKI) // TO TEST //#define DOGLCD_CS 45 @@ -408,7 +408,7 @@ //#define SD_DETECT_PIN EXP2_10_PIN //#define KILL_PIN EXP1_01_PIN - #elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864) + #elif ANY(MKS_MINI_12864, FYSETC_MINI_12864) // TO TEST //#define BEEPER_PIN EXP1_06_PIN @@ -453,7 +453,7 @@ //#define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN // TO TEST //#define RGB_LED_R_PIN 25 diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h index 1c73926781ac..3cfceb9c44fe 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h @@ -291,7 +291,7 @@ //#define LCD_PINS_ENABLE EXP2_06_PIN // SID (MOSI) //#define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock - #elif BOTH(IS_NEWPANEL, PANEL_ONE) + #elif ALL(IS_NEWPANEL, PANEL_ONE) // TO TEST //#define LCD_PINS_RS EXP1_02_PIN @@ -327,7 +327,7 @@ #else - #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) + #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) // TO TEST //#define LCD_PINS_DC 25 // Set as output on init //#define LCD_PINS_RS 27 // Pull low for 1s to init @@ -424,7 +424,7 @@ //#define LCD_SDSS SDSS //#define SD_DETECT_PIN EXP2_10_PIN - #elif EITHER(VIKI2, miniVIKI) + #elif ANY(VIKI2, miniVIKI) // TO TEST //#define DOGLCD_CS 45 @@ -459,7 +459,7 @@ //#define SD_DETECT_PIN EXP2_10_PIN //#define KILL_PIN EXP1_01_PIN - #elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864) + #elif ANY(MKS_MINI_12864, FYSETC_MINI_12864) // TO TEST //#define BEEPER_PIN EXP1_06_PIN @@ -504,7 +504,7 @@ //#define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN // TO TEST //#define RGB_LED_R_PIN 25 diff --git a/Marlin/src/pins/samd/pins_MINITRONICS20.h b/Marlin/src/pins/samd/pins_MINITRONICS20.h index ed83c835469a..ea14847be411 100644 --- a/Marlin/src/pins/samd/pins_MINITRONICS20.h +++ b/Marlin/src/pins/samd/pins_MINITRONICS20.h @@ -197,7 +197,7 @@ #define BTN_EN1 27 #define BTN_EN2 33 - #elif BOTH(IS_NEWPANEL, PANEL_ONE) + #elif ALL(IS_NEWPANEL, PANEL_ONE) // TO TEST //#define LCD_PINS_RS EXP1_02_PIN @@ -233,7 +233,7 @@ #else - #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) + #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) // TO TEST //#define LCD_PINS_DC 25 // Set as output on init //#define LCD_PINS_RS 27 // Pull low for 1s to init @@ -322,7 +322,7 @@ //#define LCD_SDSS SDSS //#define SD_DETECT_PIN EXP2_10_PIN - #elif EITHER(VIKI2, miniVIKI) + #elif ANY(VIKI2, miniVIKI) // TO TEST //#define DOGLCD_CS 45 @@ -357,7 +357,7 @@ //#define SD_DETECT_PIN EXP2_10_PIN //#define KILL_PIN EXP1_01_PIN - #elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864) + #elif ANY(MKS_MINI_12864, FYSETC_MINI_12864) // TO TEST //#define BEEPER_PIN EXP1_06_PIN @@ -402,7 +402,7 @@ //#define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN // TO TEST //#define RGB_LED_R_PIN 25 diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index 7adb2404c158..cc5dc6ffdb6a 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -278,7 +278,7 @@ //#define LCD_PINS_ENABLE 51 // SID (MOSI) //#define LCD_PINS_D4 52 // SCK (CLK) clock - #elif BOTH(IS_NEWPANEL, PANEL_ONE) + #elif ALL(IS_NEWPANEL, PANEL_ONE) // TO TEST //#define LCD_PINS_RS 40 @@ -314,7 +314,7 @@ #else - #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) + #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) // TO TEST //#define LCD_PINS_DC 25 // Set as output on init //#define LCD_PINS_RS 27 // Pull low for 1s to init @@ -408,7 +408,7 @@ //#define LCD_SDSS SDSS //#define SD_DETECT_PIN 49 - #elif EITHER(VIKI2, miniVIKI) + #elif ANY(VIKI2, miniVIKI) // TO TEST //#define DOGLCD_CS 45 @@ -444,7 +444,7 @@ //#define SD_DETECT_PIN 49 //#define KILL_PIN 41 - #elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864) + #elif ANY(MKS_MINI_12864, FYSETC_MINI_12864) // TO TEST //#define BEEPER_PIN 37 @@ -485,7 +485,7 @@ //#define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN // TO TEST //#define RGB_LED_R_PIN 25 diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index a61692c9f1fa..7c4c842b002f 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -49,12 +49,12 @@ // LCD / Controller // #if ANY(MKS_MINI_12864, CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) - #if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) + #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define LCD_PINS_RS 28 // ST9720 CS #define LCD_PINS_ENABLE 17 // ST9720 DAT #define LCD_PINS_D4 30 // ST9720 CLK #endif - #if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) + #if ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define DOGLCD_CS 28 #define DOGLCD_A0 30 #endif diff --git a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h index da010ab1a6e2..3171d21c9eeb 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h @@ -32,7 +32,7 @@ #define LCD_SDSS -1 -#if EITHER(CR10_STOCKDISPLAY, LCD_FOR_MELZI) +#if ANY(CR10_STOCKDISPLAY, LCD_FOR_MELZI) #define LCD_PINS_RS 30 #define LCD_PINS_ENABLE 28 #define LCD_PINS_D4 16 diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h index a9e40b2b17a6..557698694c6d 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h @@ -133,7 +133,7 @@ #define LCD_BACKLIGHT_PIN 17 // LCD backlight LED #endif -#if !HAS_CUTTER && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(HAS_WIRED_LCD, IS_NEWPANEL) // try to use IO Header +#if !HAS_CUTTER && ENABLED(SANGUINOLOLU_V_1_2) && !ALL(HAS_WIRED_LCD, IS_NEWPANEL) // try to use IO Header #define CASE_LIGHT_PIN 4 // Hardware PWM - see if IO Header is available #endif @@ -270,7 +270,7 @@ // M3/M4/M5 - Spindle/Laser Control // #if HAS_CUTTER - #if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(HAS_WIRED_LCD, IS_NEWPANEL) // try to use IO Header + #if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !ALL(HAS_WIRED_LCD, IS_NEWPANEL) // try to use IO Header #define SPINDLE_LASER_ENA_PIN 10 // Pullup or pulldown! #define SPINDLE_LASER_PWM_PIN 4 // Hardware PWM diff --git a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h index bd9230c32a82..b902ee7457af 100644 --- a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h +++ b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h @@ -92,7 +92,7 @@ #define X_MIN_PIN 21 #define Y_MIN_PIN 18 -#if EITHER(Z6S_ZFAULT, Z6BS_ZFAULT) +#if ANY(Z6S_ZFAULT, Z6BS_ZFAULT) #define Z_MIN_PIN 25 #else #define Z_MIN_PIN 13 @@ -109,7 +109,7 @@ #define Y_DIR_PIN 19 #define Y_ENABLE_PIN 24 -#if EITHER(Z6S_ZFAULT, Z6BS_ZFAULT) +#if ANY(Z6S_ZFAULT, Z6BS_ZFAULT) #define Z_STEP_PIN 27 #define Z_DIR_PIN 26 #else @@ -119,7 +119,7 @@ #define Z_ENABLE_PIN 24 -#if EITHER(Z6S_ZFAULT, Z6BS_ZFAULT) +#if ANY(Z6S_ZFAULT, Z6BS_ZFAULT) #define E0_STEP_PIN 15 #define E0_DIR_PIN 14 #else @@ -150,7 +150,7 @@ // // Filament Runout Sensor // -#if EITHER(Z6S_ZFAULT, Z6BS_ZFAULT) +#if ANY(Z6S_ZFAULT, Z6BS_ZFAULT) #define FIL_RUNOUT_PIN 13 #else #define FIL_RUNOUT_PIN 25 // Z-MIN @@ -201,7 +201,7 @@ #define BOARD_ST7920_DELAY_2 DELAY_2_NOP #define BOARD_ST7920_DELAY_3 DELAY_2_NOP -#elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) +#elif ANY(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) // // OLED 128x64 // diff --git a/Marlin/src/pins/sensitive_pins.h b/Marlin/src/pins/sensitive_pins.h index 061e27faf4f7..f01754fca0e8 100644 --- a/Marlin/src/pins/sensitive_pins.h +++ b/Marlin/src/pins/sensitive_pins.h @@ -643,7 +643,7 @@ #endif #endif -#elif EITHER(HAS_MULTI_EXTRUDER, MIXING_EXTRUDER) +#elif ANY(HAS_MULTI_EXTRUDER, MIXING_EXTRUDER) #undef _E1_PINS #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, _E1_CS _E1_MS1 _E1_MS2 _E1_MS3 diff --git a/Marlin/src/pins/stm32f1/pins_BEAST.h b/Marlin/src/pins/stm32f1/pins_BEAST.h index 4dafe2f27365..d494b29c1448 100644 --- a/Marlin/src/pins/stm32f1/pins_BEAST.h +++ b/Marlin/src/pins/stm32f1/pins_BEAST.h @@ -131,7 +131,7 @@ #error "LCD_I2C_PANELOLU2 is not supported." #elif ENABLED(LCD_I2C_VIKI) #error "LCD_I2C_VIKI is not supported." - #elif EITHER(VIKI2, miniVIKI) + #elif ANY(VIKI2, miniVIKI) #error "VIKI2 / miniVIKI is not supported." #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) #error "ELB_FULL_GRAPHIC_CONTROLLER is not supported." diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h index 075258991ddd..cee195997db7 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -31,7 +31,7 @@ // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800U) // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) @@ -203,7 +203,7 @@ #define LCD_PINS_D7 EXP1_01_PIN #define ADC_KEYPAD_PIN PA1 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! - #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) + #elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) /** Creality Ender-2 display pinout * ------ @@ -295,7 +295,7 @@ #endif // HAS_WIRED_LCD -#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) +#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_E3_DIP.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" @@ -351,7 +351,7 @@ #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PA7 -#elif SD_CONNECTION_IS(LCD) && BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) +#elif SD_CONNECTION_IS(LCD) && ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #define SD_DETECT_PIN EXP1_01_PIN #define SD_SS_PIN EXP1_05_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h index 5770f4a5ba01..a78ba48dce88 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h @@ -31,7 +31,7 @@ // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800U) // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) @@ -217,7 +217,7 @@ #define LCD_PINS_D7 EXP1_01_PIN #define ADC_KEYPAD_PIN PA1 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! - #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) + #elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP1_03_PIN @@ -342,7 +342,7 @@ #endif // HAS_WIRED_LCD -#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) +#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" @@ -396,7 +396,7 @@ #if SD_CONNECTION_IS(ONBOARD) #define SD_DETECT_PIN PC4 -#elif SD_CONNECTION_IS(LCD) && (BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL) +#elif SD_CONNECTION_IS(LCD) && (ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL) #define SD_DETECT_PIN EXP1_01_PIN #define SD_SS_PIN EXP1_05_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index c544e1353c1f..a7da1dff2d80 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -31,7 +31,7 @@ // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800U) // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) @@ -140,7 +140,7 @@ // // LCD / Controller // -#if EITHER(TFT_COLOR_UI, TFT_CLASSIC_UI) +#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI) #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP2_03_PIN @@ -219,7 +219,7 @@ //#define LED_PIN EXP1_07_PIN // green //#define LED_PIN EXP1_08_PIN // blue - //#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + //#if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) // #ifndef RGB_LED_R_PIN // #define RGB_LED_R_PIN EXP1_06_PIN // #endif diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index c73544bf436f..de99db072654 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -41,7 +41,7 @@ // // EEPROM // -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE 0x800U // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D.h b/Marlin/src/pins/stm32f1/pins_CHITU3D.h index 3b66096a270d..b46b5bf0ce5e 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D.h @@ -104,7 +104,7 @@ #define LCD_PINS_RS PD1 // 49 // CS chip select /SS chip slave select #define LCD_PINS_ENABLE PD3 // 51 // SID (MOSI) #define LCD_PINS_D4 PD4 // 52 // SCK (CLK) clock - #elif BOTH(IS_NEWPANEL, PANEL_ONE) + #elif ALL(IS_NEWPANEL, PANEL_ONE) #define LCD_PINS_RS PB8 #define LCD_PINS_ENABLE PD2 #define LCD_PINS_D4 PB12 @@ -171,7 +171,7 @@ #define LCD_SDSS PD5 // 53 #define SD_DETECT_PIN PD1 // 49 - #elif EITHER(VIKI2, miniVIKI) + #elif ANY(VIKI2, miniVIKI) #define BEEPER_PIN PC1 // 33 diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h index b7ea20725b25..31c36c52db46 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h @@ -32,7 +32,7 @@ #error "Creality v24S1 only supports 1 hotend / E stepper." #endif -#if BOTH(BLTOUCH, Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) +#if ALL(BLTOUCH, Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) #error "Disable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN when using BLTOUCH with Creality V24S1-301." #endif diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h index a0152a522166..164cccd482c9 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h @@ -52,7 +52,7 @@ #define IIC_EEPROM_SDA PA11 #define IIC_EEPROM_SCL PA12 #define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16) -#elif EITHER(SDCARD_EEPROM_EMULATION, FLASH_EEPROM_EMULATION) +#elif ANY(SDCARD_EEPROM_EMULATION, FLASH_EEPROM_EMULATION) #define MARLIN_EEPROM_SIZE 0x800 // 2K #endif diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index c5125aaff4d8..de8418af657b 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -183,7 +183,7 @@ #define EXP3_07_PIN PB12 #define EXP3_08_PIN PB15 -#elif EITHER(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD) +#elif ANY(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD) /** * VET6 12864 LCD @@ -204,7 +204,7 @@ #define EXP3_07_PIN PA4 #define EXP3_08_PIN PA7 -#elif EITHER(CR10_STOCKDISPLAY, FYSETC_MINI_12864_2_1) +#elif ANY(CR10_STOCKDISPLAY, FYSETC_MINI_12864_2_1) #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for the LCD with the Creality V4 controller." #endif diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h index f3b7e4f308b9..7977ffdcd55e 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h @@ -164,7 +164,7 @@ #define EXP3_07_PIN PB12 #define EXP3_08_PIN PB15 -#elif EITHER(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD) +#elif ANY(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD) /** * VET6 12864 LCD diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h index d3d3685531dc..33481b302f0c 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h @@ -168,7 +168,7 @@ #define EXP3_07_PIN PB12 #define EXP3_08_PIN PB15 -#elif EITHER(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD) +#elif ANY(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD) /** * VET6 12864 LCD diff --git a/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h b/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h index 08c9500fc5e1..cab05c2805c2 100644 --- a/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h @@ -39,7 +39,7 @@ #define DISABLE_JTAG //#define ENABLE_SPI3 -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800U) // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) @@ -98,7 +98,7 @@ #define FAN1_PIN PD12 #elif DISABLED(FET_ORDER_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE") #define HEATER_BED_PIN PD12 - #if EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) + #if ANY(HAS_MULTI_HOTEND, HEATERS_PARALLEL) #define HEATER_1_PIN PB9 #else #define FAN1_PIN PB9 @@ -106,9 +106,9 @@ #endif #ifndef FAN_PIN - #if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan + #if ANY(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan #define FAN_PIN PB5 - #elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan + #elif ANY(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan #define FAN_PIN PD12 #elif ENABLED(FET_ORDER_EEB) // Hotend, Hotend, Bed #define FAN_PIN -1 // IO pin. Buffer needed diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index c6b65962a5d1..2901e6abe0a0 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -51,7 +51,7 @@ // // EEPROM // -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800U) // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) diff --git a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h index f39850f755f1..3083dfd6b704 100644 --- a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h @@ -30,7 +30,7 @@ // // Flash EEPROM Emulation // -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE 0x800 // 2K #define EEPROM_START_ADDRESS (0x8000000 + 256 * 1024 - 2 * EEPROM_PAGE_SIZE) // 256K firmware space diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h b/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h index 9250ee112762..882671971342 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h @@ -38,7 +38,7 @@ // // Flash EEPROM Emulation // -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800U) // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h index e59e8aef595f..abc2a7bb2aad 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h @@ -35,7 +35,7 @@ #define RESET_STEPPERS_ON_MEDIA_INSERT #define DISABLE_JTAG -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800U) // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) @@ -164,7 +164,7 @@ #define DOGLCD_SCK EXP1_06_PIN #define DOGLCD_MOSI EXP1_08_PIN - #if EITHER(FYSETC_MINI_12864, U8GLIB_ST7920) + #if ANY(FYSETC_MINI_12864, U8GLIB_ST7920) #define FORCE_SOFT_SPI #endif //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h index 24981cda61f4..44a5ab47b1a0 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h @@ -51,7 +51,7 @@ //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 // Enable EEPROM Emulation for this board as it doesn't have EEPROM -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h index cbe23356e38b..06611fcfb570 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h @@ -51,7 +51,7 @@ //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 // Enable EEPROM Emulation for this board as it doesn't have EEPROM -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h index 1418340d2dcf..e98a06550907 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h @@ -56,7 +56,7 @@ //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 // Enable EEPROM Emulation for this board as it doesn't have EEPROM -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h index 22ff91aeac45..427c286c1a8b 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h @@ -51,7 +51,7 @@ //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 // Enable EEPROM Emulation for this board as it doesn't have EEPROM -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif diff --git a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h index f157c8e45544..7b40a1d711b8 100644 --- a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h @@ -51,7 +51,7 @@ #define E2END 0xFFFF // EEPROM end address AT24C256 (32kB) */ -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE 0x800U // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 89525d93ef48..66d99ab34566 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -52,7 +52,7 @@ //#define FLASH_EEPROM_EMULATION //#define SDCARD_EEPROM_EMULATION -#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) +#if ANY(NO_EEPROM_SELECTED, I2C_EEPROM) #define I2C_EEPROM // EEPROM on I2C-0 #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 642c97bb1144..a34e3a2d0ce3 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -38,7 +38,7 @@ // // EEPROM // -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800U) // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h index 59441dc80609..b90ffb17a1eb 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h @@ -43,7 +43,7 @@ // // EEPROM // -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800U) // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) @@ -149,7 +149,7 @@ * If the screen stays white, disable 'LCD_RESET_PIN' * to let the bootloader init the screen. */ -#if EITHER(HAS_FSMC_GRAPHICAL_TFT, TFT_320x240) +#if ANY(HAS_FSMC_GRAPHICAL_TFT, TFT_320x240) #define FSMC_CS_PIN PD7 // NE4 #define FSMC_RS_PIN PD11 // A0 @@ -164,7 +164,7 @@ #define LCD_BACKLIGHT_PIN PD13 #endif -#if BOTH(NEED_TOUCH_PINS, HAS_FSMC_GRAPHICAL_TFT) || ENABLED(TFT_320x240) +#if ALL(NEED_TOUCH_PINS, HAS_FSMC_GRAPHICAL_TFT) || ENABLED(TFT_320x240) #define TOUCH_CS_PIN PC2 // SPI2_NSS #define TOUCH_SCK_PIN PB13 // SPI2_SCK #define TOUCH_MISO_PIN PB14 // SPI2_MISO diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 8dba94313651..b366fe9d003c 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -54,7 +54,7 @@ //#define FLASH_EEPROM_EMULATION //#define SDCARD_EEPROM_EMULATION -#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) +#if ANY(NO_EEPROM_SELECTED, I2C_EEPROM) #define I2C_EEPROM // EEPROM on I2C-0 #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h index 858dabb8b986..8764ae3ce17a 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h @@ -42,7 +42,7 @@ #if ENABLED(SRAM_EEPROM_EMULATION) #undef NO_EEPROM_SELECTED #endif -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800U) // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) diff --git a/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h b/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h index ed602d8d011e..dd085790718c 100644 --- a/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h +++ b/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h @@ -31,7 +31,7 @@ // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800U) // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) @@ -177,7 +177,7 @@ #define LCD_PINS_D4 PC1 #endif -#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) +#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_PANDA_PI_V29.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" @@ -218,7 +218,7 @@ #define CLCD_MOD_RESET PA9 #define CLCD_SPI_CS PB8 - #if SD_CONNECTION_IS(LCD) && BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) + #if SD_CONNECTION_IS(LCD) && ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #define SD_DETECT_PIN PA15 #define SD_SS_PIN PA10 #endif diff --git a/Marlin/src/pins/stm32f1/pins_STM32F1R.h b/Marlin/src/pins/stm32f1/pins_STM32F1R.h index 634cadc1aa8e..c08b707d7e99 100644 --- a/Marlin/src/pins/stm32f1/pins_STM32F1R.h +++ b/Marlin/src/pins/stm32f1/pins_STM32F1R.h @@ -120,7 +120,7 @@ #error "LCD_I2C_PANELOLU2 is not supported." #elif ENABLED(LCD_I2C_VIKI) #error "LCD_I2C_VIKI is not supported." - #elif EITHER(VIKI2, miniVIKI) + #elif ANY(VIKI2, miniVIKI) #error "VIKI2 / miniVIKI is not supported." #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) #error "ELB_FULL_GRAPHIC_CONTROLLER is not supported." diff --git a/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h b/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h index eee7dbf31669..e189fc3f97b9 100644 --- a/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h @@ -144,7 +144,7 @@ #error "LCD_I2C_PANELOLU2 is not supported." #elif ENABLED(LCD_I2C_VIKI) #error "LCD_I2C_VIKI is not supported." - #elif EITHER(VIKI2, miniVIKI) + #elif ANY(VIKI2, miniVIKI) #error "VIKI2 / miniVIKI is not supported." #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) #error "ELB_FULL_GRAPHIC_CONTROLLER is not supported." diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h index 1347a1467882..ed1fcc4cb092 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h @@ -205,7 +205,7 @@ #define BOARD_ST7920_DELAY_2 200 #define BOARD_ST7920_DELAY_3 125 -#elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) +#elif ANY(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) //================================================================================ // OLED 128x64 diff --git a/Marlin/src/pins/stm32f4/pins_ARMED.h b/Marlin/src/pins/stm32f4/pins_ARMED.h index 2abcc21da5a4..b514d6c223fd 100644 --- a/Marlin/src/pins/stm32f4/pins_ARMED.h +++ b/Marlin/src/pins/stm32f4/pins_ARMED.h @@ -158,7 +158,7 @@ #define LCD_RESET_PIN PB12 // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN PB13 #endif diff --git a/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h b/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h index 7413b9b0645a..583aaf9fa34e 100644 --- a/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h +++ b/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h @@ -126,7 +126,7 @@ // LCD / Controller // #if HAS_WIRED_LCD - #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) + #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) #define LCD_PINS_DC PB8 // Set as output on init #define LCD_PINS_RS PB9 // Pull low for 1s to init // DOGM SPI LCD Support @@ -143,7 +143,7 @@ #define LCD_RESET_PIN PB5 // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN PB9 #endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index 2147dd9b4fa7..471b010b25e6 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -283,7 +283,7 @@ #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index 60e33d9dc4ad..13b7bf3c62b8 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -197,7 +197,7 @@ #if HAS_WIRED_LCD - #if EITHER(CR10_STOCKDISPLAY, LCD_FOR_MELZI) + #if ANY(CR10_STOCKDISPLAY, LCD_FOR_MELZI) #define BEEPER_PIN PE8 @@ -259,7 +259,7 @@ #define LCD_PINS_D7 PE8 #define ADC_KEYPAD_PIN PB0 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! - #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) + #elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define BTN_ENC PE9 #define BTN_EN1 PE7 @@ -331,7 +331,7 @@ #endif // HAS_WIRED_LCD -#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) +#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index fe03ec8983ff..1c0f15574734 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -453,7 +453,7 @@ //#define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index 8b061a431c13..a6ab5ea159ba 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -27,7 +27,7 @@ #define USES_DIAG_JUMPERS // Onboard I2C EEPROM -#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) +#if ANY(NO_EEPROM_SELECTED, I2C_EEPROM) #undef NO_EEPROM_SELECTED #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4K (AT24C32) @@ -95,7 +95,7 @@ #else #define X_MIN_PIN E0_DIAG_PIN // E0DET #endif -#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX) +#elif ANY(DUAL_X_CARRIAGE, NEEDS_X_MINMAX) #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // X-STOP #endif @@ -483,7 +483,7 @@ #define DOGLCD_A0 EXP1_04_PIN //#define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h index 31551f6ff6f4..9d7ad570a497 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h @@ -43,7 +43,7 @@ #endif // Onboard I2C EEPROM -#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) +#if ANY(NO_EEPROM_SELECTED, I2C_EEPROM) #undef NO_EEPROM_SELECTED #define I2C_EEPROM #define SOFT_I2C_EEPROM // Force the use of Software I2C @@ -219,7 +219,7 @@ #define LCD_PINS_D7 EXP1_01_PIN #define ADC_KEYPAD_PIN PA1 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! - #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) + #elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP1_03_PIN @@ -280,7 +280,7 @@ #endif // HAS_WIRED_LCD -#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) +#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" @@ -332,7 +332,7 @@ #define SDCARD_CONNECTION ONBOARD #endif -#if SD_CONNECTION_IS(LCD) && (BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL) +#if SD_CONNECTION_IS(LCD) && (ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL) #define SD_DETECT_PIN EXP1_01_PIN #define SD_SS_PIN EXP1_05_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index f848a181131b..50923212fd86 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -29,8 +29,8 @@ // https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT //#define BTT_MOTOR_EXPANSION -#if BOTH(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) - #if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) +#if ALL(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) + #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define EXP_MOT_USE_EXP2_ONLY 1 #else #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time." @@ -504,7 +504,7 @@ #define DOGLCD_A0 EXP1_04_PIN //#define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index 10105a6ce830..b07e8e7a2fd7 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -29,8 +29,8 @@ // https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT //#define BTT_MOTOR_EXPANSION -#if BOTH(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) - #if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) +#if ALL(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) + #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define EXP_MOT_USE_EXP2_ONLY 1 #else #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time." @@ -483,7 +483,7 @@ #define DOGLCD_A0 EXP1_04_PIN //#define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index 031caa1ce174..bdc9b8978b2b 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -34,7 +34,7 @@ // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define FLASH_EEPROM_LEVELING @@ -217,7 +217,7 @@ #define DOGLCD_A0 EXP1_04_PIN //#define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index fca181c1f46a..13f3c684d2a9 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -291,7 +291,7 @@ #define LCD_BACKLIGHT_PIN EXP1_07_PIN #endif #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h index 1896cd5441b3..c833c30b975e 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h @@ -259,7 +259,7 @@ #endif #endif -#if EITHER(TFT_COLOR_UI, TFT_CLASSIC_UI) +#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI) #define TFT_CS_PIN EXP1_07_PIN #define TFT_SCK_PIN EXP2_02_PIN #define TFT_MISO_PIN EXP2_01_PIN diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h index 42b252d320e7..5b5045227175 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h @@ -33,7 +33,7 @@ // Use one of these or SDCard-based Emulation will be used //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation //#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation -#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) +#if ANY(NO_EEPROM_SELECTED, I2C_EEPROM) #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4K #define I2C_SCL_PIN PB6 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h index 3f0d4e5ee924..89f777b6e99d 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -75,7 +75,7 @@ // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN // X- -#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX) +#elif ANY(DUAL_X_CARRIAGE, NEEDS_X_MINMAX) #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // X- #endif @@ -325,7 +325,7 @@ #define DOGLCD_A0 EXP1_04_PIN //#define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h index 4fb57985b993..5a9ce8d84cdc 100644 --- a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h +++ b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h @@ -61,7 +61,7 @@ // // Limit Switches // -#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) +#if ANY(SENSORLESS_HOMING, SENSORLESS_PROBING) // Sensorless homing pins #if ENABLED(X_AXIS_SENSORLESS_HOMING) #define X_STOP_PIN PB4 @@ -266,7 +266,7 @@ #endif -#if EITHER(CR10_STOCKDISPLAY, MKS_MINI_12864) +#if ANY(CR10_STOCKDISPLAY, MKS_MINI_12864) #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN #define BTN_ENC EXP1_02_PIN diff --git a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h index 3de67ea8d591..ad789be959db 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h @@ -38,7 +38,7 @@ // // EEPROM // -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #undef NO_EEPROM_SELECTED #ifndef FLASH_EEPROM_EMULATION #define FLASH_EEPROM_EMULATION diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h index 54c2c4c77b2d..a8d626867bf7 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h @@ -35,7 +35,7 @@ // // EEPROM // -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #undef NO_EEPROM_SELECTED #ifndef FLASH_EEPROM_EMULATION #define FLASH_EEPROM_EMULATION @@ -285,7 +285,7 @@ #define LCD_PINS_D7 EXP1_01_PIN #define ADC_KEYPAD_PIN PA7 // Repurpose default SERVO0_PIN for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! - #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) + #elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN @@ -316,7 +316,7 @@ #define SD_DETECT_PIN -1 -#if SD_CONNECTION_IS(LCD) && (BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL) +#if SD_CONNECTION_IS(LCD) && (ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL) #define SD_SS_PIN EXP1_05_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "SD CUSTOM_CABLE is not compatible with Manta E3 EZ." diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h index 876475f88355..1c46bcf62b57 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h @@ -37,7 +37,7 @@ // // EEPROM // -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #undef NO_EEPROM_SELECTED #ifndef FLASH_EEPROM_EMULATION #define FLASH_EEPROM_EMULATION @@ -258,7 +258,7 @@ // results in LCD soft SPI mode 3, SD soft SPI mode 0 #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h index f4ce5a16d3b0..e22722a7d0c7 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h @@ -35,7 +35,7 @@ // // EEPROM // -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #undef NO_EEPROM_SELECTED #ifndef FLASH_EEPROM_EMULATION #define FLASH_EEPROM_EMULATION @@ -286,7 +286,7 @@ // results in LCD soft SPI mode 3, SD soft SPI mode 0 #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h index 6516538c4402..6cfc73546007 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h @@ -33,7 +33,7 @@ // // EEPROM // -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) +#if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #undef NO_EEPROM_SELECTED #ifndef FLASH_EEPROM_EMULATION #define FLASH_EEPROM_EMULATION @@ -99,7 +99,7 @@ #else #define X_MIN_PIN E0_DIAG_PIN // MIN5 #endif -#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX) +#elif ANY(DUAL_X_CARRIAGE, NEEDS_X_MINMAX) #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // MIN1 #endif @@ -350,7 +350,7 @@ // results in LCD soft SPI mode 3, SD soft SPI mode 0 #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h index f71b7b40ebd1..bf79d9cf3e88 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h @@ -37,7 +37,7 @@ #define LED_PIN PD8 // Onboard I2C EEPROM -#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) +#if ANY(NO_EEPROM_SELECTED, I2C_EEPROM) #undef NO_EEPROM_SELECTED #define I2C_EEPROM #define SOFT_I2C_EEPROM // Force the use of Software I2C @@ -255,7 +255,7 @@ #define LCD_PINS_D7 EXP1_01_PIN #define ADC_KEYPAD_PIN PA1 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! - #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) + #elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP1_03_PIN @@ -363,7 +363,7 @@ #endif // HAS_WIRED_LCD -#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) +#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" @@ -416,7 +416,7 @@ #if SD_CONNECTION_IS(ONBOARD) #define SD_DETECT_PIN PC3 -#elif SD_CONNECTION_IS(LCD) && (BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL) +#elif SD_CONNECTION_IS(LCD) && (ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL) #define SD_DETECT_PIN EXP1_01_PIN #define SD_SS_PIN EXP1_05_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h index 13e30591ba6a..72becf28e96d 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -28,7 +28,7 @@ #define USES_DIAG_JUMPERS // Onboard I2C EEPROM -#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) +#if ANY(NO_EEPROM_SELECTED, I2C_EEPROM) #undef NO_EEPROM_SELECTED #define I2C_EEPROM #define SOFT_I2C_EEPROM // Force the use of Software I2C @@ -95,7 +95,7 @@ #else #define X_MIN_PIN E0_DIAG_PIN // E0DET #endif -#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX) +#elif ANY(DUAL_X_CARRIAGE, NEEDS_X_MINMAX) #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // X-STOP #endif @@ -456,7 +456,7 @@ // results in LCD soft SPI mode 3, SD soft SPI mode 0 //#define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h index b9e1ff10ad16..b87d6697fb7d 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h @@ -27,8 +27,8 @@ // https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT //#define BTT_MOTOR_EXPANSION -#if BOTH(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) - #if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) +#if ALL(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) + #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define EXP_MOT_USE_EXP2_ONLY 1 #else #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time." @@ -38,7 +38,7 @@ #define USES_DIAG_JUMPERS // Onboard I2C EEPROM -#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) +#if ANY(NO_EEPROM_SELECTED, I2C_EEPROM) #undef NO_EEPROM_SELECTED #define I2C_EEPROM #define SOFT_I2C_EEPROM // Force the use of Software I2C @@ -472,7 +472,7 @@ #define DOGLCD_A0 EXP1_04_PIN //#define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_06_PIN #endif diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h index 1fb7387d160c..c02ad47e5cfa 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h @@ -139,7 +139,7 @@ #define LCD_PINS_D6 5 // D5 JP11-6 #define LCD_PINS_D7 4 // D4 JP11-5 - #if EITHER(VIKI2, miniVIKI) + #if ANY(VIKI2, miniVIKI) #define BEEPER_PIN 8 // E0 JP11-10 #define DOGLCD_A0 40 // F2 JP2-2 diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h index 5ce106b485cc..07a00c2f928e 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h @@ -220,7 +220,7 @@ #define LCD_PINS_D6 5 // D5 JP11-6 #define LCD_PINS_D7 4 // D4 JP11-5 - #if EITHER(VIKI2, miniVIKI) + #if ANY(VIKI2, miniVIKI) #define BEEPER_PIN 8 // E0 JP11-10 #define DOGLCD_A0 40 // F2 JP2-2 diff --git a/Marlin/src/pins/teensy2/pins_SAV_MKI.h b/Marlin/src/pins/teensy2/pins_SAV_MKI.h index a469bba59b32..878edf65c601 100644 --- a/Marlin/src/pins/teensy2/pins_SAV_MKI.h +++ b/Marlin/src/pins/teensy2/pins_SAV_MKI.h @@ -163,7 +163,7 @@ #define SR_CLK_PIN EXT_AUX_SCL_D0 #endif -#if EITHER(SAV_3DLCD, SAV_3DGLCD) +#if ANY(SAV_3DLCD, SAV_3DGLCD) #define BTN_EN1 EXT_AUX_A1_IO #define BTN_EN2 EXT_AUX_A0_IO diff --git a/Marlin/src/sd/Sd2Card.h b/Marlin/src/sd/Sd2Card.h index 23677b24fa4b..71e31ac614c2 100644 --- a/Marlin/src/sd/Sd2Card.h +++ b/Marlin/src/sd/Sd2Card.h @@ -83,7 +83,7 @@ uint8_t const SD_CARD_TYPE_SD1 = 1, // Standard capacity V1 SD card /** * Define SOFTWARE_SPI to use bit-bang SPI */ -#if EITHER(MEGA_SOFT_SPI, USE_SOFTWARE_SPI) +#if ANY(MEGA_SOFT_SPI, USE_SOFTWARE_SPI) #define SOFTWARE_SPI #endif diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index fb2721a2b282..02b5e68bdf05 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -56,7 +56,7 @@ #include "../feature/pause.h" #endif -#define DEBUG_OUT EITHER(DEBUG_CARDREADER, MARLIN_DEV_MODE) +#define DEBUG_OUT ANY(DEBUG_CARDREADER, MARLIN_DEV_MODE) #include "../core/debug_out.h" #include "../libs/hex_print.h" @@ -172,7 +172,7 @@ CardReader::CardReader() { workDirDepth = 0; ZERO(workDirParents); - #if BOTH(SDSUPPORT, HAS_SD_DETECT) + #if ALL(SDSUPPORT, HAS_SD_DETECT) SET_INPUT_PULLUP(SD_DETECT_PIN); #endif @@ -465,7 +465,7 @@ void CardReader::mount() { if (flag.mounted) cdroot(); else { - #if EITHER(HAS_SD_DETECT, USB_FLASH_DRIVE_SUPPORT) + #if ANY(HAS_SD_DETECT, USB_FLASH_DRIVE_SUPPORT) if (marlin_state != MF_INITIALIZING) LCD_ALERTMESSAGE(MSG_MEDIA_INIT_FAIL); #endif } @@ -1243,7 +1243,7 @@ void CardReader::cdroot() { } else { sort_order[0] = 0; - #if BOTH(SDSORT_USES_RAM, SDSORT_CACHE_NAMES) + #if ALL(SDSORT_USES_RAM, SDSORT_CACHE_NAMES) #if ENABLED(SDSORT_DYNAMIC_RAM) sortnames = new char*[1]; sortshort = new char*[1]; diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index 86acb1b8628c..d7103c660764 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -283,7 +283,7 @@ class CardReader { static uint8_t sort_order[SDSORT_LIMIT]; #endif - #if BOTH(SDSORT_USES_RAM, SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM) + #if ALL(SDSORT_USES_RAM, SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM) #define SORTED_LONGNAME_MAXLEN (SDSORT_CACHE_VFATS) * (FILENAME_LENGTH) #define SORTED_LONGNAME_STORAGE (SORTED_LONGNAME_MAXLEN + 1) #else diff --git a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h index 3390bc51becc..f722c873ae0a 100644 --- a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h +++ b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h @@ -33,7 +33,7 @@ /** * Define SOFTWARE_SPI to use bit-bang SPI */ - #if EITHER(MEGA_SOFT_SPI, USE_SOFTWARE_SPI) + #if ANY(MEGA_SOFT_SPI, USE_SOFTWARE_SPI) #define SOFTWARE_SPI #endif diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.h b/buildroot/share/PlatformIO/scripts/common-dependencies.h index da2d380a82b6..e35218f1f55b 100644 --- a/buildroot/share/PlatformIO/scripts/common-dependencies.h +++ b/buildroot/share/PlatformIO/scripts/common-dependencies.h @@ -33,7 +33,7 @@ // #if ENABLED(SR_LCD_3W_NL) // Feature checks for SR_LCD_3W_NL -#elif EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) +#elif ANY(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) #define USES_LIQUIDTWI2 #elif ENABLED(LCD_I2C_TYPE_PCA8574) #define USES_LIQUIDCRYSTAL_I2C @@ -59,10 +59,10 @@ #if ENABLED(CANCEL_OBJECTS) #define HAS_MENU_CANCELOBJECT #endif - #if EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) + #if ANY(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) #define HAS_MENU_DELTA_CALIBRATE #endif - #if EITHER(LED_CONTROL_MENU, CASE_LIGHT_MENU) + #if ANY(LED_CONTROL_MENU, CASE_LIGHT_MENU) #define HAS_MENU_LED #endif #if ENABLED(ADVANCED_PAUSE_FEATURE)