From 8916b05cb46e310e261902301afd0ae2b301159e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 29 Aug 2021 20:54:51 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Tweak=20pins,=20comment=20format?= =?UTF-8?q?ting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/settings.cpp | 12 +++--- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 46 +++++++++++----------- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index fca33c98c2..632f95558d 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -2397,13 +2397,15 @@ void MarlinSettings::postprocess() { UNUSED(s); } - const uint16_t MarlinSettings::meshes_end = persistentStore.capacity() - 129; // 128 (+1 because of the change to capacity rather than last valid address) - // is a placeholder for the size of the MAT; the MAT will always - // live at the very end of the eeprom + // 128 (+1 because of the change to capacity rather than last valid address) + // is a placeholder for the size of the MAT; the MAT will always + // live at the very end of the eeprom + const uint16_t MarlinSettings::meshes_end = persistentStore.capacity() - 129; uint16_t MarlinSettings::meshes_start_index() { - return (datasize() + EEPROM_OFFSET + 32) & 0xFFF8; // Pad the end of configuration data so it can float up - // or down a little bit without disrupting the mesh data + // Pad the end of configuration data so it can float up + // or down a little bit without disrupting the mesh data + return (datasize() + EEPROM_OFFSET + 32) & 0xFFF8; } #define MESH_STORE_SIZE sizeof(TERN(OPTIMIZED_MESH_STORAGE, mesh_store_t, ubl.z_values)) diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index 056fdf4c29..65d3fe731d 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -154,35 +154,37 @@ #define SDIO_SUPPORT #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer -#if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD) - #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller." -#endif +#if ENABLED(CR10_STOCKDISPLAY) -#if ENABLED(RET6_12864_LCD) + #if ENABLED(RET6_12864_LCD) - // RET6 12864 LCD - #define LCD_PINS_RS PB12 - #define LCD_PINS_ENABLE PB15 - #define LCD_PINS_D4 PB13 + // RET6 12864 LCD + #define LCD_PINS_RS PB12 + #define LCD_PINS_ENABLE PB15 + #define LCD_PINS_D4 PB13 - #define BTN_ENC PB2 - #define BTN_EN1 PB10 - #define BTN_EN2 PB14 + #define BTN_ENC PB2 + #define BTN_EN1 PB10 + #define BTN_EN2 PB14 - #ifndef HAS_PIN_27_BOARD - #define BEEPER_PIN PC6 - #endif + #ifndef HAS_PIN_27_BOARD + #define BEEPER_PIN PC6 + #endif -#elif ENABLED(VET6_12864_LCD) + #elif ENABLED(VET6_12864_LCD) - // VET6 12864 LCD - #define LCD_PINS_RS PA4 - #define LCD_PINS_ENABLE PA7 - #define LCD_PINS_D4 PA5 + // VET6 12864 LCD + #define LCD_PINS_RS PA4 + #define LCD_PINS_ENABLE PA7 + #define LCD_PINS_D4 PA5 - #define BTN_ENC PC5 - #define BTN_EN1 PB10 - #define BTN_EN2 PA6 + #define BTN_ENC PC5 + #define BTN_EN1 PB10 + #define BTN_EN2 PA6 + + #else + #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller." + #endif #elif EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI)