Browse Source

🎨 Tweak pins, comment formatting

Scott Lahteine 3 years ago
parent
commit
e33e101850
2 changed files with 31 additions and 27 deletions
  1. 7
    5
      Marlin/src/module/settings.cpp
  2. 24
    22
      Marlin/src/pins/stm32f1/pins_CREALITY_V4.h

+ 7
- 5
Marlin/src/module/settings.cpp View File

2397
       UNUSED(s);
2397
       UNUSED(s);
2398
     }
2398
     }
2399
 
2399
 
2400
-    const uint16_t MarlinSettings::meshes_end = persistentStore.capacity() - 129; // 128 (+1 because of the change to capacity rather than last valid address)
2401
-                                                                                  // is a placeholder for the size of the MAT; the MAT will always
2402
-                                                                                  // live at the very end of the eeprom
2400
+    // 128 (+1 because of the change to capacity rather than last valid address)
2401
+    // is a placeholder for the size of the MAT; the MAT will always
2402
+    // live at the very end of the eeprom
2403
+    const uint16_t MarlinSettings::meshes_end = persistentStore.capacity() - 129;
2403
 
2404
 
2404
     uint16_t MarlinSettings::meshes_start_index() {
2405
     uint16_t MarlinSettings::meshes_start_index() {
2405
-      return (datasize() + EEPROM_OFFSET + 32) & 0xFFF8;  // Pad the end of configuration data so it can float up
2406
-                                                          // or down a little bit without disrupting the mesh data
2406
+      // Pad the end of configuration data so it can float up
2407
+      // or down a little bit without disrupting the mesh data
2408
+      return (datasize() + EEPROM_OFFSET + 32) & 0xFFF8;
2407
     }
2409
     }
2408
 
2410
 
2409
     #define MESH_STORE_SIZE sizeof(TERN(OPTIMIZED_MESH_STORAGE, mesh_store_t, ubl.z_values))
2411
     #define MESH_STORE_SIZE sizeof(TERN(OPTIMIZED_MESH_STORAGE, mesh_store_t, ubl.z_values))

+ 24
- 22
Marlin/src/pins/stm32f1/pins_CREALITY_V4.h View File

154
 #define SDIO_SUPPORT
154
 #define SDIO_SUPPORT
155
 #define NO_SD_HOST_DRIVE                          // This board's SD is only seen by the printer
155
 #define NO_SD_HOST_DRIVE                          // This board's SD is only seen by the printer
156
 
156
 
157
-#if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD)
158
-  #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
159
-#endif
157
+#if ENABLED(CR10_STOCKDISPLAY)
160
 
158
 
161
-#if ENABLED(RET6_12864_LCD)
159
+  #if ENABLED(RET6_12864_LCD)
162
 
160
 
163
-  // RET6 12864 LCD
164
-  #define LCD_PINS_RS                       PB12
165
-  #define LCD_PINS_ENABLE                   PB15
166
-  #define LCD_PINS_D4                       PB13
161
+    // RET6 12864 LCD
162
+    #define LCD_PINS_RS                     PB12
163
+    #define LCD_PINS_ENABLE                 PB15
164
+    #define LCD_PINS_D4                     PB13
167
 
165
 
168
-  #define BTN_ENC                           PB2
169
-  #define BTN_EN1                           PB10
170
-  #define BTN_EN2                           PB14
166
+    #define BTN_ENC                         PB2
167
+    #define BTN_EN1                         PB10
168
+    #define BTN_EN2                         PB14
171
 
169
 
172
-  #ifndef HAS_PIN_27_BOARD
173
-    #define BEEPER_PIN                      PC6
174
-  #endif
170
+    #ifndef HAS_PIN_27_BOARD
171
+      #define BEEPER_PIN                    PC6
172
+    #endif
175
 
173
 
176
-#elif ENABLED(VET6_12864_LCD)
174
+  #elif ENABLED(VET6_12864_LCD)
177
 
175
 
178
-  // VET6 12864 LCD
179
-  #define LCD_PINS_RS                       PA4
180
-  #define LCD_PINS_ENABLE                   PA7
181
-  #define LCD_PINS_D4                       PA5
176
+    // VET6 12864 LCD
177
+    #define LCD_PINS_RS                     PA4
178
+    #define LCD_PINS_ENABLE                 PA7
179
+    #define LCD_PINS_D4                     PA5
182
 
180
 
183
-  #define BTN_ENC                           PC5
184
-  #define BTN_EN1                           PB10
185
-  #define BTN_EN2                           PA6
181
+    #define BTN_ENC                         PC5
182
+    #define BTN_EN1                         PB10
183
+    #define BTN_EN2                         PA6
184
+
185
+  #else
186
+    #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
187
+  #endif
186
 
188
 
187
 #elif EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI)
189
 #elif EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI)
188
 
190
 

Loading…
Cancel
Save