Skip to content

Commit

Permalink
🎨 HAS_SPI_FLASH => SPI_FLASH
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Dec 16, 2022
1 parent 031ff2d commit 9ae0789
Show file tree
Hide file tree
Showing 22 changed files with 35 additions and 35 deletions.
4 changes: 2 additions & 2 deletions Marlin/src/gcode/control/M993_M994.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -85,4 +85,4 @@ void GcodeSuite::M994() {
card.closefile();
}

#endif // HAS_SPI_FLASH && SDSUPPORT && MARLIN_DEV_MODE
#endif // SPI_FLASH && SDSUPPORT && MARLIN_DEV_MODE
2 changes: 1 addition & 1 deletion Marlin/src/gcode/gcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/gcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ class GcodeSuite {
static void M995();
#endif

#if BOTH(HAS_SPI_FLASH, SDSUPPORT)
#if BOTH(SPI_FLASH, SDSUPPORT)
static void M993();
static void M994();
#endif
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/libs/W25Qxx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../inc/MarlinConfig.h"

#if HAS_SPI_FLASH
#if ENABLED(SPI_FLASH)

#include "W25Qxx.h"

Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions Marlin/src/pins/linux/pins_RAMPS_LINUX.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/pins/stm32f1/pins_CHITU3D_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

//
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

//
Expand Down
2 changes: 1 addition & 1 deletion ini/features.ini
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ EMERGENCY_PARSER = src_filter=+<src/feature/e_parser.cpp>
EASYTHREED_UI = src_filter=+<src/feature/easythreed_ui.cpp>
I2C_POSITION_ENCODERS = src_filter=+<src/feature/encoder_i2c.cpp>
IIC_BL24CXX_EEPROM = src_filter=+<src/libs/BL24CXX.cpp>
HAS_SPI_FLASH = src_filter=+<src/libs/W25Qxx.cpp>
SPI_FLASH = src_filter=+<src/libs/W25Qxx.cpp>
HAS_ETHERNET = src_filter=+<src/feature/ethernet.cpp> +<src/gcode/feature/network/M552-M554.cpp>
HAS_FANCHECK = src_filter=+<src/feature/fancheck.cpp> +<src/gcode/temp/M123.cpp>
HAS_FANMUX = src_filter=+<src/feature/fanmux.cpp>
Expand Down

0 comments on commit 9ae0789

Please sign in to comment.