diff --git a/Marlin/src/gcode/control/M993_M994.cpp b/Marlin/src/gcode/control/M993_M994.cpp index 252792e522..598a73fab7 100644 --- a/Marlin/src/gcode/control/M993_M994.cpp +++ b/Marlin/src/gcode/control/M993_M994.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ALL(HAS_SPI_FLASH, SDSUPPORT, MARLIN_DEV_MODE) +#if ALL(SPI_FLASH, SDSUPPORT, MARLIN_DEV_MODE) #include "../gcode.h" #include "../../sd/cardreader.h" @@ -85,4 +85,4 @@ void GcodeSuite::M994() { card.closefile(); } -#endif // HAS_SPI_FLASH && SDSUPPORT && MARLIN_DEV_MODE +#endif // SPI_FLASH && SDSUPPORT && MARLIN_DEV_MODE diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 7edcaa981c..0667ef0b7b 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -1053,7 +1053,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 422: M422(); break; // M422: Set Z Stepper automatic alignment position using probe #endif - #if ALL(HAS_SPI_FLASH, SDSUPPORT, MARLIN_DEV_MODE) + #if ALL(SPI_FLASH, SDSUPPORT, MARLIN_DEV_MODE) case 993: M993(); break; // M993: Backup SPI Flash to SD case 994: M994(); break; // M994: Load a Backup from SD to SPI Flash #endif diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index d69298e28b..e2506e4ed9 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -1194,7 +1194,7 @@ private: static void M995(); #endif - #if BOTH(HAS_SPI_FLASH, SDSUPPORT) + #if BOTH(SPI_FLASH, SDSUPPORT) static void M993(); static void M994(); #endif diff --git a/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp index 6f2351bba6..6508f6f024 100644 --- a/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp +++ b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp @@ -27,8 +27,8 @@ #include "../../../inc/MarlinConfig.h" #include "SPIFlashStorage.h" -#if !HAS_SPI_FLASH - #error "HAS_SPI_FLASH is required with TFT_LVGL_UI." +#if DISABLED(SPI_FLASH) + #error "SPI_FLASH is required with TFT_LVGL_UI." #endif extern W25QXXFlash W25QXX; diff --git a/Marlin/src/libs/W25Qxx.cpp b/Marlin/src/libs/W25Qxx.cpp index 033402d04a..591d0d0693 100644 --- a/Marlin/src/libs/W25Qxx.cpp +++ b/Marlin/src/libs/W25Qxx.cpp @@ -22,7 +22,7 @@ #include "../inc/MarlinConfig.h" -#if HAS_SPI_FLASH +#if ENABLED(SPI_FLASH) #include "W25Qxx.h" @@ -380,4 +380,4 @@ void W25QXXFlash::SPI_FLASH_BufferRead(uint8_t *pBuffer, uint32_t ReadAddr, uint SPI_FLASH_CS_H(); } -#endif // HAS_SPI_FLASH +#endif // SPI_FLASH diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index 75d6b9d93e..3616b7a27c 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -396,8 +396,8 @@ #define SD_DETECT_PIN 41 - #define HAS_SPI_FLASH 1 - #if HAS_SPI_FLASH + #define SPI_FLASH + #if ENABLED(SPI_FLASH) #define SPI_DEVICE 1 #define SPI_FLASH_SIZE 0x1000000 // 16MB #define SPI_FLASH_CS_PIN 31 diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h index bc41e97041..f5dd4a42b0 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h @@ -114,8 +114,8 @@ #endif // SPI Flash -#define HAS_SPI_FLASH 1 -#if HAS_SPI_FLASH +#define SPI_FLASH +#if ENABLED(SPI_FLASH) #define SPI_FLASH_SIZE 0x200000 // 2MB #endif diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index dd621eb5c1..ff588f9488 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -68,8 +68,8 @@ #define SPI_DEVICE 2 // SPI Flash -#define HAS_SPI_FLASH 1 -#if HAS_SPI_FLASH +#define SPI_FLASH +#if ENABLED(SPI_FLASH) // SPI 2 #define SPI_FLASH_CS_PIN PB12 // SPI2_NSS / Flash chip-select #define SPI_FLASH_MOSI_PIN PB15 diff --git a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h index e6d3174653..ad6b84b057 100644 --- a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h +++ b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h @@ -183,7 +183,7 @@ // #if NO_EEPROM_SELECTED //#define SPI_EEPROM - //#define HAS_SPI_FLASH 1 // need MARLIN_DEV_MODE for M993/M994 eeprom backup tests + //#define SPI_FLASH // need MARLIN_DEV_MODE for M993/M994 EEPROM backup tests #define FLASH_EEPROM_EMULATION #endif @@ -196,7 +196,7 @@ #define EEPROM_MOSI_PIN BOARD_SPI1_MOSI_PIN // PA7 pin 32 #define EEPROM_PAGE_SIZE 0x1000U // 4K (from datasheet) #define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE) // Limit to 64K for now... -#elif HAS_SPI_FLASH +#elif ENABLED(SPI_FLASH) #define SPI_FLASH_SIZE 0x40000U // limit to 256K (M993 will reboot with 512) #define SPI_FLASH_CS_PIN PC5 #define SPI_FLASH_MOSI_PIN PA7 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index 2c147eb9f3..be5f6c7404 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -272,8 +272,8 @@ // // W25Q64 64Mb (8MB) SPI flash // -#define HAS_SPI_FLASH 1 -#if HAS_SPI_FLASH +#define SPI_FLASH +#if ENABLED(SPI_FLASH) #define SPI_FLASH_SIZE 0x800000 // 8MB #define SPI_FLASH_CS_PIN PG9 #define SPI_FLASH_MOSI_PIN PB15 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index b8f6f6a330..89525d93ef 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -377,8 +377,8 @@ #endif // HAS_WIRED_LCD && !HAS_SPI_TFT -#define HAS_SPI_FLASH 1 -#if HAS_SPI_FLASH +#define SPI_FLASH +#if ENABLED(SPI_FLASH) #define SPI_FLASH_SIZE 0x1000000 // 16MB #define SPI_FLASH_CS_PIN PB12 #define SPI_FLASH_MOSI_PIN PB15 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h index 0bfc7f5c8d..59441dc806 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h @@ -196,8 +196,8 @@ #endif #endif -#define HAS_SPI_FLASH 1 -#if HAS_SPI_FLASH +#define SPI_FLASH +#if ENABLED(SPI_FLASH) #define SPI_FLASH_SIZE 0x1000000 // 16MB #define SPI_FLASH_CS_PIN PB12 // Flash chip-select #define SPI_FLASH_MOSI_PIN PB15 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 9c6373bef9..8dba943136 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -379,8 +379,8 @@ #endif // HAS_WIRED_LCD && !HAS_SPI_TFT -#define HAS_SPI_FLASH 1 -#if HAS_SPI_FLASH +#define SPI_FLASH +#if ENABLED(SPI_FLASH) #define SPI_FLASH_SIZE 0x1000000 // 16MB #define SPI_FLASH_CS_PIN PB12 #define SPI_FLASH_MOSI_PIN PB15 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 6f1a790580..858dabb8b9 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h @@ -208,8 +208,8 @@ #define TFT_BUFFER_SIZE 14400 #endif -#define HAS_SPI_FLASH 1 -#if HAS_SPI_FLASH +#define SPI_FLASH +#if ENABLED(SPI_FLASH) #define SPI_FLASH_SIZE 0x1000000 // 16MB #define SPI_FLASH_CS_PIN PB12 #define SPI_FLASH_MOSI_PIN PB15 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 1db2d0c5dd..048570102b 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -308,8 +308,8 @@ #define BOARD_ST7920_DELAY_3 125 #endif -#define HAS_SPI_FLASH 1 -#if HAS_SPI_FLASH +#define SPI_FLASH +#if ENABLED(SPI_FLASH) #define SPI_FLASH_SIZE 0x1000000 // 16MB #define SPI_FLASH_CS_PIN PB12 // Flash chip-select #define SPI_FLASH_MOSI_PIN PB15 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 9ff9f6a475..35287050b8 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -28,7 +28,7 @@ // Onboard I2C EEPROM #define I2C_EEPROM -#define MARLIN_EEPROM_SIZE 0x1000 // 4KB (AT24C32) +#define MARLIN_EEPROM_SIZE 0x1000 // 4K (AT24C32) #define I2C_SCL_PIN PB8 #define I2C_SDA_PIN PB9 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 1e278cd4ba..31551f6ff6 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 @@ -49,7 +49,7 @@ #define SOFT_I2C_EEPROM // Force the use of Software I2C #define I2C_SCL_PIN PB8 #define I2C_SDA_PIN PB9 - #define MARLIN_EEPROM_SIZE 0x1000 // 4KB + #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif // 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 4ac64ae1d2..603da09d14 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 @@ -225,7 +225,7 @@ #define SPI_FLASH #if ENABLED(SPI_FLASH) - #define HAS_SPI_FLASH 1 + #define SPI_FLASH #define SPI_DEVICE 2 #define SPI_FLASH_SIZE 0x1000000 #define SPI_FLASH_CS_PIN PB12 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index 7e08caaa82..873ba3e90d 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -273,7 +273,7 @@ // // LCD / Controller #define SPI_FLASH -#define HAS_SPI_FLASH 1 +#define SPI_FLASH #define SPI_DEVICE 2 #define SPI_FLASH_SIZE 0x1000000 #if ENABLED(SPI_FLASH) 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 046fbb95bf..d00b21c30b 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -35,7 +35,7 @@ // Onboard I2C EEPROM #define I2C_EEPROM -#define MARLIN_EEPROM_SIZE 0x1000 // 4KB (AT24C32) +#define MARLIN_EEPROM_SIZE 0x1000 // 4K (AT24C32) #define I2C_SCL_PIN PB8 #define I2C_SDA_PIN PB9 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 24376d6f9c..eaceafe29e 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 @@ -46,7 +46,7 @@ #define SOFT_I2C_EEPROM // Force the use of Software I2C #define I2C_SCL_PIN PA14 #define I2C_SDA_PIN PA13 - #define MARLIN_EEPROM_SIZE 0x1000 // 4KB + #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif // diff --git a/ini/features.ini b/ini/features.ini index 7e4a3f97be..5f30db8a2f 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -119,7 +119,7 @@ EMERGENCY_PARSER = src_filter=+ EASYTHREED_UI = src_filter=+ I2C_POSITION_ENCODERS = src_filter=+ IIC_BL24CXX_EEPROM = src_filter=+ -HAS_SPI_FLASH = src_filter=+ +SPI_FLASH = src_filter=+ HAS_ETHERNET = src_filter=+ + HAS_FANCHECK = src_filter=+ + HAS_FANMUX = src_filter=+