Browse Source

🎨 HAS_SPI_FLASH => SPI_FLASH

Scott Lahteine 1 year ago
parent
commit
dd3b65bb1f

+ 2
- 2
Marlin/src/gcode/control/M993_M994.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../../inc/MarlinConfig.h"
24 24
 
25
-#if ALL(HAS_SPI_FLASH, SDSUPPORT, MARLIN_DEV_MODE)
25
+#if ALL(SPI_FLASH, SDSUPPORT, MARLIN_DEV_MODE)
26 26
 
27 27
 #include "../gcode.h"
28 28
 #include "../../sd/cardreader.h"
@@ -85,4 +85,4 @@ void GcodeSuite::M994() {
85 85
   card.closefile();
86 86
 }
87 87
 
88
-#endif // HAS_SPI_FLASH && SDSUPPORT && MARLIN_DEV_MODE
88
+#endif // SPI_FLASH && SDSUPPORT && MARLIN_DEV_MODE

+ 1
- 1
Marlin/src/gcode/gcode.cpp View File

@@ -1053,7 +1053,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
1053 1053
         case 422: M422(); break;                                  // M422: Set Z Stepper automatic alignment position using probe
1054 1054
       #endif
1055 1055
 
1056
-      #if ALL(HAS_SPI_FLASH, SDSUPPORT, MARLIN_DEV_MODE)
1056
+      #if ALL(SPI_FLASH, SDSUPPORT, MARLIN_DEV_MODE)
1057 1057
         case 993: M993(); break;                                  // M993: Backup SPI Flash to SD
1058 1058
         case 994: M994(); break;                                  // M994: Load a Backup from SD to SPI Flash
1059 1059
       #endif

+ 1
- 1
Marlin/src/gcode/gcode.h View File

@@ -1194,7 +1194,7 @@ private:
1194 1194
     static void M995();
1195 1195
   #endif
1196 1196
 
1197
-  #if BOTH(HAS_SPI_FLASH, SDSUPPORT)
1197
+  #if BOTH(SPI_FLASH, SDSUPPORT)
1198 1198
     static void M993();
1199 1199
     static void M994();
1200 1200
   #endif

+ 2
- 2
Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp View File

@@ -27,8 +27,8 @@
27 27
 #include "../../../inc/MarlinConfig.h"
28 28
 #include "SPIFlashStorage.h"
29 29
 
30
-#if !HAS_SPI_FLASH
31
-  #error "HAS_SPI_FLASH is required with TFT_LVGL_UI."
30
+#if DISABLED(SPI_FLASH)
31
+  #error "SPI_FLASH is required with TFT_LVGL_UI."
32 32
 #endif
33 33
 
34 34
 extern W25QXXFlash W25QXX;

+ 2
- 2
Marlin/src/libs/W25Qxx.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../inc/MarlinConfig.h"
24 24
 
25
-#if HAS_SPI_FLASH
25
+#if ENABLED(SPI_FLASH)
26 26
 
27 27
 #include "W25Qxx.h"
28 28
 
@@ -380,4 +380,4 @@ void W25QXXFlash::SPI_FLASH_BufferRead(uint8_t *pBuffer, uint32_t ReadAddr, uint
380 380
   SPI_FLASH_CS_H();
381 381
 }
382 382
 
383
-#endif // HAS_SPI_FLASH
383
+#endif // SPI_FLASH

+ 2
- 2
Marlin/src/pins/linux/pins_RAMPS_LINUX.h View File

@@ -396,8 +396,8 @@
396 396
 
397 397
   #define SD_DETECT_PIN                       41
398 398
 
399
-  #define HAS_SPI_FLASH                        1
400
-  #if HAS_SPI_FLASH
399
+  #define SPI_FLASH
400
+  #if ENABLED(SPI_FLASH)
401 401
     #define SPI_DEVICE                         1
402 402
     #define SPI_FLASH_SIZE             0x1000000  // 16MB
403 403
     #define SPI_FLASH_CS_PIN                  31

+ 2
- 2
Marlin/src/pins/stm32f1/pins_CHITU3D_common.h View File

@@ -114,8 +114,8 @@
114 114
 #endif
115 115
 
116 116
 // SPI Flash
117
-#define HAS_SPI_FLASH                          1
118
-#if HAS_SPI_FLASH
117
+#define SPI_FLASH
118
+#if ENABLED(SPI_FLASH)
119 119
   #define SPI_FLASH_SIZE                0x200000  // 2MB
120 120
 #endif
121 121
 

+ 2
- 2
Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h View File

@@ -68,8 +68,8 @@
68 68
 #define SPI_DEVICE                             2
69 69
 
70 70
 // SPI Flash
71
-#define HAS_SPI_FLASH                          1
72
-#if HAS_SPI_FLASH
71
+#define SPI_FLASH
72
+#if ENABLED(SPI_FLASH)
73 73
   // SPI 2
74 74
   #define SPI_FLASH_CS_PIN                  PB12  // SPI2_NSS / Flash chip-select
75 75
   #define SPI_FLASH_MOSI_PIN                PB15

+ 2
- 2
Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h View File

@@ -183,7 +183,7 @@
183 183
 //
184 184
 #if NO_EEPROM_SELECTED
185 185
   //#define SPI_EEPROM
186
-  //#define HAS_SPI_FLASH                      1  // need MARLIN_DEV_MODE for M993/M994 eeprom backup tests
186
+  //#define SPI_FLASH                             // need MARLIN_DEV_MODE for M993/M994 EEPROM backup tests
187 187
   #define FLASH_EEPROM_EMULATION
188 188
 #endif
189 189
 
@@ -196,7 +196,7 @@
196 196
   #define EEPROM_MOSI_PIN    BOARD_SPI1_MOSI_PIN  // PA7 pin 32
197 197
   #define EEPROM_PAGE_SIZE               0x1000U  // 4K (from datasheet)
198 198
   #define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE)   // Limit to 64K for now...
199
-#elif HAS_SPI_FLASH
199
+#elif ENABLED(SPI_FLASH)
200 200
   #define SPI_FLASH_SIZE                0x40000U  // limit to 256K (M993 will reboot with 512)
201 201
   #define SPI_FLASH_CS_PIN                  PC5
202 202
   #define SPI_FLASH_MOSI_PIN                PA7

+ 2
- 2
Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h View File

@@ -272,8 +272,8 @@
272 272
 //
273 273
 // W25Q64 64Mb (8MB) SPI flash
274 274
 //
275
-#define HAS_SPI_FLASH                          1
276
-#if HAS_SPI_FLASH
275
+#define SPI_FLASH
276
+#if ENABLED(SPI_FLASH)
277 277
   #define SPI_FLASH_SIZE                0x800000  // 8MB
278 278
   #define SPI_FLASH_CS_PIN                  PG9
279 279
   #define SPI_FLASH_MOSI_PIN                PB15

+ 2
- 2
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h View File

@@ -377,8 +377,8 @@
377 377
 
378 378
 #endif // HAS_WIRED_LCD && !HAS_SPI_TFT
379 379
 
380
-#define HAS_SPI_FLASH                          1
381
-#if HAS_SPI_FLASH
380
+#define SPI_FLASH
381
+#if ENABLED(SPI_FLASH)
382 382
   #define SPI_FLASH_SIZE               0x1000000  // 16MB
383 383
   #define SPI_FLASH_CS_PIN                  PB12
384 384
   #define SPI_FLASH_MOSI_PIN                PB15

+ 2
- 2
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h View File

@@ -196,8 +196,8 @@
196 196
   #endif
197 197
 #endif
198 198
 
199
-#define HAS_SPI_FLASH                          1
200
-#if HAS_SPI_FLASH
199
+#define SPI_FLASH
200
+#if ENABLED(SPI_FLASH)
201 201
   #define SPI_FLASH_SIZE               0x1000000  // 16MB
202 202
   #define SPI_FLASH_CS_PIN                  PB12  // Flash chip-select
203 203
   #define SPI_FLASH_MOSI_PIN                PB15

+ 2
- 2
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h View File

@@ -379,8 +379,8 @@
379 379
 
380 380
 #endif // HAS_WIRED_LCD && !HAS_SPI_TFT
381 381
 
382
-#define HAS_SPI_FLASH                          1
383
-#if HAS_SPI_FLASH
382
+#define SPI_FLASH
383
+#if ENABLED(SPI_FLASH)
384 384
   #define SPI_FLASH_SIZE               0x1000000  // 16MB
385 385
   #define SPI_FLASH_CS_PIN                  PB12
386 386
   #define SPI_FLASH_MOSI_PIN                PB15

+ 2
- 2
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h View File

@@ -208,8 +208,8 @@
208 208
   #define TFT_BUFFER_SIZE                  14400
209 209
 #endif
210 210
 
211
-#define HAS_SPI_FLASH                          1
212
-#if HAS_SPI_FLASH
211
+#define SPI_FLASH
212
+#if ENABLED(SPI_FLASH)
213 213
   #define SPI_FLASH_SIZE               0x1000000  // 16MB
214 214
   #define SPI_FLASH_CS_PIN                  PB12
215 215
   #define SPI_FLASH_MOSI_PIN                PB15

+ 2
- 2
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h View File

@@ -308,8 +308,8 @@
308 308
   #define BOARD_ST7920_DELAY_3               125
309 309
 #endif
310 310
 
311
-#define HAS_SPI_FLASH                          1
312
-#if HAS_SPI_FLASH
311
+#define SPI_FLASH
312
+#if ENABLED(SPI_FLASH)
313 313
   #define SPI_FLASH_SIZE               0x1000000  // 16MB
314 314
   #define SPI_FLASH_CS_PIN                  PB12  // Flash chip-select
315 315
   #define SPI_FLASH_MOSI_PIN                PB15

+ 1
- 1
Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h View File

@@ -28,7 +28,7 @@
28 28
 
29 29
 // Onboard I2C EEPROM
30 30
 #define I2C_EEPROM
31
-#define MARLIN_EEPROM_SIZE                0x1000  // 4KB (AT24C32)
31
+#define MARLIN_EEPROM_SIZE                0x1000  // 4K (AT24C32)
32 32
 #define I2C_SCL_PIN                         PB8
33 33
 #define I2C_SDA_PIN                         PB9
34 34
 

+ 1
- 1
Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h View File

@@ -49,7 +49,7 @@
49 49
   #define SOFT_I2C_EEPROM                         // Force the use of Software I2C
50 50
   #define I2C_SCL_PIN                       PB8
51 51
   #define I2C_SDA_PIN                       PB9
52
-  #define MARLIN_EEPROM_SIZE              0x1000  // 4KB
52
+  #define MARLIN_EEPROM_SIZE              0x1000  // 4K
53 53
 #endif
54 54
 
55 55
 //

+ 1
- 1
Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h View File

@@ -225,7 +225,7 @@
225 225
 
226 226
 #define SPI_FLASH
227 227
 #if ENABLED(SPI_FLASH)
228
-  #define HAS_SPI_FLASH                        1
228
+  #define SPI_FLASH
229 229
   #define SPI_DEVICE                           2
230 230
   #define SPI_FLASH_SIZE               0x1000000
231 231
   #define SPI_FLASH_CS_PIN                  PB12

+ 1
- 1
Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h View File

@@ -273,7 +273,7 @@
273 273
 //
274 274
 // LCD / Controller
275 275
 #define SPI_FLASH
276
-#define HAS_SPI_FLASH                          1
276
+#define SPI_FLASH
277 277
 #define SPI_DEVICE                             2
278 278
 #define SPI_FLASH_SIZE                 0x1000000
279 279
 #if ENABLED(SPI_FLASH)

+ 1
- 1
Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h View File

@@ -35,7 +35,7 @@
35 35
 
36 36
 // Onboard I2C EEPROM
37 37
 #define I2C_EEPROM
38
-#define MARLIN_EEPROM_SIZE                0x1000  // 4KB (AT24C32)
38
+#define MARLIN_EEPROM_SIZE                0x1000  // 4K (AT24C32)
39 39
 #define I2C_SCL_PIN                         PB8
40 40
 #define I2C_SDA_PIN                         PB9
41 41
 

+ 1
- 1
Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h View File

@@ -46,7 +46,7 @@
46 46
   #define SOFT_I2C_EEPROM                         // Force the use of Software I2C
47 47
   #define I2C_SCL_PIN                       PA14
48 48
   #define I2C_SDA_PIN                       PA13
49
-  #define MARLIN_EEPROM_SIZE              0x1000  // 4KB
49
+  #define MARLIN_EEPROM_SIZE              0x1000  // 4K
50 50
 #endif
51 51
 
52 52
 //

+ 1
- 1
ini/features.ini View File

@@ -119,7 +119,7 @@ EMERGENCY_PARSER                       = src_filter=+<src/feature/e_parser.cpp>
119 119
 EASYTHREED_UI                          = src_filter=+<src/feature/easythreed_ui.cpp>
120 120
 I2C_POSITION_ENCODERS                  = src_filter=+<src/feature/encoder_i2c.cpp>
121 121
 IIC_BL24CXX_EEPROM                     = src_filter=+<src/libs/BL24CXX.cpp>
122
-HAS_SPI_FLASH                          = src_filter=+<src/libs/W25Qxx.cpp>
122
+SPI_FLASH                              = src_filter=+<src/libs/W25Qxx.cpp>
123 123
 HAS_ETHERNET                           = src_filter=+<src/feature/ethernet.cpp> +<src/gcode/feature/network/M552-M554.cpp>
124 124
 HAS_FANCHECK                           = src_filter=+<src/feature/fancheck.cpp> +<src/gcode/temp/M123.cpp>
125 125
 HAS_FANMUX                             = src_filter=+<src/feature/fanmux.cpp>

Loading…
Cancel
Save