NONE on combined options

This commit is contained in:
Scott Lahteine 2019-07-05 18:20:15 -05:00
parent 67e0238c89
commit fe02241044
21 changed files with 37 additions and 37 deletions

View File

@ -55,7 +55,7 @@ void spiBegin(void) {
#endif
}
#if DISABLED(SOFTWARE_SPI, FORCE_SOFT_SPI)
#if NONE(SOFTWARE_SPI, FORCE_SOFT_SPI)
//------------------------------------------------------------------------------
// Hardware SPI

View File

@ -34,7 +34,7 @@
#include "../shared/persistent_store_api.h"
#include "../../inc/MarlinConfig.h"
#if ENABLED(EEPROM_SETTINGS) && DISABLED(I2C_EEPROM, SPI_EEPROM)
#if ENABLED(EEPROM_SETTINGS) && NONE(I2C_EEPROM, SPI_EEPROM)
#include "../shared/Marduino.h"

View File

@ -29,7 +29,7 @@
#include "../../inc/MarlinConfig.h"
#include "../shared/persistent_store_api.h"
#if DISABLED(I2C_EEPROM, SPI_EEPROM)
#if NONE(I2C_EEPROM, SPI_EEPROM)
#define E2END 0xFFF // Default to Flash emulated EEPROM size (EepromEmulation_Due.cpp)
#endif
@ -38,7 +38,7 @@ extern void eeprom_flush(void);
bool PersistentStore::access_start() { return true; }
bool PersistentStore::access_finish() {
#if DISABLED(I2C_EEPROM, SPI_EEPROM)
#if NONE(I2C_EEPROM, SPI_EEPROM)
eeprom_flush();
#endif
return true;

View File

@ -28,20 +28,20 @@
#include "../shared/persistent_store_api.h"
#if DISABLED(EEPROM_EMULATED_WITH_SRAM, SPI_EEPROM, I2C_EEPROM)
#if NONE(EEPROM_EMULATED_WITH_SRAM, SPI_EEPROM, I2C_EEPROM)
#include <EEPROM.h>
static bool eeprom_data_written = false;
#endif
bool PersistentStore::access_start() {
#if DISABLED(EEPROM_EMULATED_WITH_SRAM, SPI_EEPROM, I2C_EEPROM)
#if NONE(EEPROM_EMULATED_WITH_SRAM, SPI_EEPROM, I2C_EEPROM)
eeprom_buffer_fill();
#endif
return true;
}
bool PersistentStore::access_finish() {
#if DISABLED(EEPROM_EMULATED_WITH_SRAM, SPI_EEPROM, I2C_EEPROM)
#if NONE(EEPROM_EMULATED_WITH_SRAM, SPI_EEPROM, I2C_EEPROM)
if (eeprom_data_written) {
eeprom_buffer_flush();
eeprom_data_written = false;
@ -76,7 +76,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
pos++;
value++;
};
#if DISABLED(EEPROM_EMULATED_WITH_SRAM, SPI_EEPROM, I2C_EEPROM)
#if NONE(EEPROM_EMULATED_WITH_SRAM, SPI_EEPROM, I2C_EEPROM)
eeprom_data_written = true;
#endif

View File

@ -26,7 +26,7 @@
#include "../../inc/MarlinConfig.h"
#if ENABLED(EEPROM_SETTINGS) && DISABLED(I2C_EEPROM, SPI_EEPROM)
#if ENABLED(EEPROM_SETTINGS) && NONE(I2C_EEPROM, SPI_EEPROM)
// --------------------------------------------------------------------------
// Includes

View File

@ -67,7 +67,7 @@ void GcodeSuite::M125() {
// Lift Z axis
if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
#if HAS_HOTEND_OFFSET && DISABLED(DUAL_X_CARRIAGE, DELTA)
#if HAS_HOTEND_OFFSET && NONE(DUAL_X_CARRIAGE, DELTA)
park_point.x += hotend_offset[X_AXIS][active_extruder];
park_point.y += hotend_offset[Y_AXIS][active_extruder];
#endif

View File

@ -126,7 +126,7 @@ void GcodeSuite::M600() {
if (parser.seenval('X')) park_point.x = parser.linearval('X');
if (parser.seenval('Y')) park_point.y = parser.linearval('Y');
#if HAS_HOTEND_OFFSET && DISABLED(DUAL_X_CARRIAGE, DELTA)
#if HAS_HOTEND_OFFSET && NONE(DUAL_X_CARRIAGE, DELTA)
park_point.x += hotend_offset[X_AXIS][active_extruder];
park_point.y += hotend_offset[Y_AXIS][active_extruder];
#endif

View File

@ -477,7 +477,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#if ENABLED(MIN_SOFTWARE_ENDSTOPS) && DISABLED(MIN_SOFTWARE_ENDSTOP_Z)
#if IS_KINEMATIC
#error "MIN_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MIN_SOFTWARE_ENDSTOP_Z."
#elif DISABLED(MIN_SOFTWARE_ENDSTOP_X, MIN_SOFTWARE_ENDSTOP_Y)
#elif NONE(MIN_SOFTWARE_ENDSTOP_X, MIN_SOFTWARE_ENDSTOP_Y)
#error "MIN_SOFTWARE_ENDSTOPS requires at least one of the MIN_SOFTWARE_ENDSTOP_[XYZ] options."
#endif
#endif
@ -485,7 +485,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#if ENABLED(MAX_SOFTWARE_ENDSTOPS) && DISABLED(MAX_SOFTWARE_ENDSTOP_Z)
#if IS_KINEMATIC
#error "MAX_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MAX_SOFTWARE_ENDSTOP_Z."
#elif DISABLED(MAX_SOFTWARE_ENDSTOP_X, MAX_SOFTWARE_ENDSTOP_Y)
#elif NONE(MAX_SOFTWARE_ENDSTOP_X, MAX_SOFTWARE_ENDSTOP_Y)
#error "MAX_SOFTWARE_ENDSTOPS requires at least one of the MAX_SOFTWARE_ENDSTOP_[XYZ] options."
#endif
#endif
@ -534,7 +534,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
* Progress Bar
*/
#if ENABLED(LCD_PROGRESS_BAR)
#if DISABLED(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
#if NONE(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
#error "LCD_PROGRESS_BAR requires SDSUPPORT or LCD_SET_PROGRESS_MANUALLY."
#elif !HAS_CHARACTER_LCD
#error "LCD_PROGRESS_BAR requires a character LCD."
@ -646,7 +646,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 4 requires FIL_RUNOUT5_PIN."
#elif NUM_RUNOUT_SENSORS > 5 && !PIN_EXISTS(FIL_RUNOUT6)
#error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 5 requires FIL_RUNOUT6_PIN."
#elif DISABLED(SDSUPPORT, PRINTJOB_TIMER_AUTOSTART)
#elif NONE(SDSUPPORT, PRINTJOB_TIMER_AUTOSTART)
#error "FILAMENT_RUNOUT_SENSOR requires SDSUPPORT or PRINTJOB_TIMER_AUTOSTART."
#elif FILAMENT_RUNOUT_DISTANCE_MM < 0
#error "FILAMENT_RUNOUT_DISTANCE_MM must be greater than or equal to zero."
@ -663,7 +663,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "ADVANCED_PAUSE_FEATURE currently requires an LCD controller or EMERGENCY_PARSER."
#elif ENABLED(EXTRUDER_RUNOUT_PREVENT)
#error "EXTRUDER_RUNOUT_PREVENT is incompatible with ADVANCED_PAUSE_FEATURE."
#elif ENABLED(PARK_HEAD_ON_PAUSE) && DISABLED(SDSUPPORT, NEWPANEL, EMERGENCY_PARSER)
#elif ENABLED(PARK_HEAD_ON_PAUSE) && NONE(SDSUPPORT, NEWPANEL, EMERGENCY_PARSER)
#error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller."
#elif ENABLED(HOME_BEFORE_FILAMENT_CHANGE) && DISABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT)
#error "HOME_BEFORE_FILAMENT_CHANGE requires PAUSE_PARK_NO_STEPPER_TIMEOUT."
@ -983,7 +983,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
* Delta requirements
*/
#if ENABLED(DELTA)
#if DISABLED(USE_XMAX_PLUG, USE_YMAX_PLUG, USE_ZMAX_PLUG)
#if NONE(USE_XMAX_PLUG, USE_YMAX_PLUG, USE_ZMAX_PLUG)
#error "You probably want to use Max Endstops for DELTA!"
#elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_SEGMENTED
#error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
@ -1326,7 +1326,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
/**
* ULTIPANEL encoder
*/
#if ENABLED(ULTIPANEL) && DISABLED(NEWPANEL, SR_LCD_2W_NL) && !defined(SHIFT_CLK)
#if ENABLED(ULTIPANEL) && NONE(NEWPANEL, SR_LCD_2W_NL) && !defined(SHIFT_CLK)
#error "ULTIPANEL requires some kind of encoder."
#endif
@ -1338,7 +1338,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
* SAV_3DGLCD display options
*/
#if ENABLED(SAV_3DGLCD)
#if DISABLED(U8GLIB_SSD1306, U8GLIB_SH1106)
#if NONE(U8GLIB_SSD1306, U8GLIB_SH1106)
#error "Enable a SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
#elif BOTH(U8GLIB_SSD1306, U8GLIB_SH1106)
#error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
@ -1875,7 +1875,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
+ ENABLED(FYSETC_MINI_12864_1_2) \
+ ENABLED(FYSETC_MINI_12864_2_0) \
+ ENABLED(FYSETC_MINI_12864_2_1) \
+ (ENABLED(REPRAPWORLD_KEYPAD) && DISABLED(CARTESIO_UI, ZONESTAR_LCD)) \
+ (ENABLED(REPRAPWORLD_KEYPAD) && NONE(CARTESIO_UI, ZONESTAR_LCD)) \
+ ENABLED(RIGIDBOT_PANEL) \
+ ENABLED(RA_CONTROL_PANEL) \
+ ENABLED(LCD_SAINSMART_I2C_1602) \
@ -1883,7 +1883,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
+ ENABLED(LCM1602) \
+ ENABLED(LCD_I2C_PANELOLU2) \
+ ENABLED(LCD_I2C_VIKI) \
+ (ENABLED(U8GLIB_SSD1306) && DISABLED(OLED_PANEL_TINYBOY2, MKS_12864OLED_SSD1306)) \
+ (ENABLED(U8GLIB_SSD1306) && NONE(OLED_PANEL_TINYBOY2, MKS_12864OLED_SSD1306)) \
+ ENABLED(SAV_3DLCD) \
+ ENABLED(BQ_LCD_SMART_CONTROLLER) \
+ ENABLED(SAV_3DGLCD) \
@ -1892,7 +1892,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
+ ENABLED(ULTI_CONTROLLER) \
+ ENABLED(MALYAN_LCD) \
+ ENABLED(DGUS_LCD) \
+ (ENABLED(EXTENSIBLE_UI) && DISABLED(MALYAN_LCD, DGUS_LCD))
+ (ENABLED(EXTENSIBLE_UI) && NONE(MALYAN_LCD, DGUS_LCD))
#error "Please select no more than one LCD controller option."
#endif

View File

@ -112,7 +112,7 @@ static void createChar_P(const char c, const byte * const ptr) {
#endif
void MarlinUI::set_custom_characters(const HD44780CharSet screen_charset/*=CHARSET_INFO*/) {
#if DISABLED(LCD_PROGRESS_BAR, SHOW_BOOTSCREEN)
#if NONE(LCD_PROGRESS_BAR, SHOW_BOOTSCREEN)
UNUSED(screen_charset);
#endif
@ -516,7 +516,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
if (!TEST(axis_homed, axis))
while (const char c = *value++) lcd_put_wchar(c <= '.' ? c : '?');
else {
#if DISABLED(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING)
#if NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING)
if (!TEST(axis_known_position, axis))
lcd_put_u8str_P(axis == Z_AXIS ? PSTR(" ") : PSTR(" "));
else

View File

@ -271,7 +271,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
if (!TEST(axis_homed, axis))
while (const char c = *value++) lcd_put_wchar(c <= '.' ? c : '?');
else {
#if DISABLED(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING)
#if NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING)
if (!TEST(axis_known_position, axis))
lcd_put_u8str_P(axis == Z_AXIS ? PSTR(" ") : PSTR(" "));
else

View File

@ -239,7 +239,7 @@ void menu_bed_leveling() {
const bool is_homed = all_axes_known();
// Auto Home if not using manual probing
#if DISABLED(PROBE_MANUALLY, MESH_BED_LEVELING)
#if NONE(PROBE_MANUALLY, MESH_BED_LEVELING)
if (!is_homed) MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
#endif

View File

@ -319,7 +319,7 @@ float zprobe_zoffset; // Initialized by settings.load()
#endif
#if ENABLED(PROBING_STEPPERS_OFF)
disable_e_steppers();
#if DISABLED(DELTA, HOME_AFTER_DEACTIVATE)
#if NONE(DELTA, HOME_AFTER_DEACTIVATE)
disable_X(); disable_Y();
#endif
#endif

View File

@ -32,7 +32,7 @@
#error "Oops! Set MOTHERBOARD to an STM32F1-based board when building for STM32F1."
#endif
#if DISABLED(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768)
#if NONE(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768)
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
#endif

View File

@ -125,7 +125,7 @@
//
// Augmentation for auto-assigning RAMPS plugs
//
#if DISABLED(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if HOTENDS > 1
#if TEMP_SENSOR_BED
#define IS_RAMPS_EEB

View File

@ -122,7 +122,7 @@
//
// Augmentation for auto-assigning RAMPS plugs
//
#if DISABLED(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if HOTENDS > 1
#if TEMP_SENSOR_BED
#define IS_RAMPS_EEB

View File

@ -51,7 +51,7 @@
#error "Oops! Set MOTHERBOARD to an STM32F1-based board when building for STM32F1."
#endif
#if DISABLED(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768)
#if NONE(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768)
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
#endif
@ -171,7 +171,7 @@
//
// Augmentation for auto-assigning RAMPS plugs
//
#if DISABLED(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if HOTENDS > 1
#if TEMP_SENSOR_BED
#define IS_RAMPS_EEB

View File

@ -139,7 +139,7 @@
//
// Augmentation for auto-assigning RAMPS plugs
//
#if DISABLED(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if HOTENDS > 1
#if TEMP_SENSOR_BED
#define IS_RAMPS_EEB

View File

@ -152,7 +152,7 @@
//
// Augmentation for auto-assigning RAMPS plugs
//
#if DISABLED(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if HOTENDS > 1
#if TEMP_SENSOR_BED
#define IS_RAMPS_EEB

View File

@ -37,7 +37,7 @@
#error "Oops! Set MOTHERBOARD to an STM32F1-based board when building for STM32F1."
#endif
#if DISABLED(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768)
#if NONE(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768)
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
#endif

View File

@ -131,7 +131,7 @@
// Mixing stepper, Switching stepper, or regular stepper
#define E_NEEDED(N) (ENABLED(MIXING_EXTRUDER) && MIXING_STEPPERS > N) \
|| (ENABLED(SWITCHING_EXTRUDER) && E_STEPPERS > N) \
|| (DISABLED(SWITCHING_EXTRUDER, MIXING_EXTRUDER) && EXTRUDERS > N)
|| (NONE(SWITCHING_EXTRUDER, MIXING_EXTRUDER) && EXTRUDERS > N)
#define _E0_CS
#define _E0_MS1

View File

@ -30,7 +30,7 @@
#include "../inc/MarlinConfig.h"
#if ENABLED(SDSUPPORT) && DISABLED(USB_FLASH_DRIVE_SUPPORT, SDIO_SUPPORT)
#if ENABLED(SDSUPPORT) && NONE(USB_FLASH_DRIVE_SUPPORT, SDIO_SUPPORT)
/* Enable FAST CRC computations - You can trade speed for FLASH space if
* needed by disabling the following define */