From 253f91765d839cb7b688eaed1586d20c51795722 Mon Sep 17 00:00:00 2001 From: dotdash32 Date: Sun, 5 Sep 2021 17:21:25 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Use=20largest=20default=20ST9720?= =?UTF-8?q?=20delays=20(#22713)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/HAL/AVR/HAL.h | 12 ++--- Marlin/src/HAL/LINUX/HAL.h | 6 +-- Marlin/src/HAL/LPC1768/HAL.h | 6 +-- Marlin/src/HAL/NATIVE_SIM/HAL.h | 6 +-- Marlin/src/HAL/STM32/HAL.h | 6 +-- Marlin/src/HAL/STM32F1/HAL.h | 6 +-- Marlin/src/HAL/TEENSY31_32/HAL.h | 6 +-- Marlin/src/HAL/TEENSY35_36/HAL.h | 6 +-- Marlin/src/HAL/TEENSY40_41/HAL.h | 6 +-- Marlin/src/inc/Conditionals_LCD.h | 12 ++--- .../dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp | 50 +++++++++++++++++++ Marlin/src/pins/mega/pins_SILVER_GATE.h | 6 +-- Marlin/src/pins/pins_postprocess.h | 30 +---------- Marlin/src/pins/rambo/pins_EINSY_RAMBO.h | 6 +-- Marlin/src/pins/rambo/pins_EINSY_RETRO.h | 6 +-- Marlin/src/pins/rambo/pins_MINIRAMBO.h | 6 +-- Marlin/src/pins/rambo/pins_RAMBO.h | 6 +-- Marlin/src/pins/ramps/pins_3DRAG.h | 6 +-- Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h | 6 +-- Marlin/src/pins/ramps/pins_DAGOMA_F5.h | 6 +-- .../src/pins/ramps/pins_FORMBOT_TREX2PLUS.h | 6 +-- Marlin/src/pins/sanguino/pins_ANET_10.h | 12 ++--- Marlin/src/pins/sanguino/pins_MELZI.h | 6 +-- .../src/pins/sanguino/pins_MELZI_CREALITY.h | 6 +-- Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h | 6 +-- Marlin/src/pins/sanguino/pins_MELZI_V2.h | 6 +-- .../src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 6 +-- .../src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 6 +-- Marlin/src/pins/stm32f1/pins_FLY_MINI.h | 6 +-- Marlin/src/pins/stm32f1/pins_GTM32_MINI.h | 6 +-- Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h | 6 +-- Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h | 6 +-- Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h | 6 +-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 6 +-- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 6 +-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h | 6 +-- .../src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h | 6 +-- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 6 +-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 6 +-- Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h | 6 +-- Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h | 6 +-- Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h | 6 +-- .../src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 6 +-- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 11 ++-- Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 11 ++-- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 11 ++-- .../pins/stm32f4/pins_BTT_SKR_PRO_common.h | 11 ++-- .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 11 ++-- Marlin/src/pins/stm32f4/pins_FLYF407ZG.h | 6 +-- .../pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 11 ++-- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 6 +-- Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h | 6 +-- .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 6 +-- .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 6 +-- Marlin/src/pins/stm32f4/pins_RUMBA32_common.h | 6 +-- .../pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h | 9 ++-- Marlin/src/pins/stm32f4/pins_VAKE403D.h | 6 +-- Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h | 6 +-- .../src/pins/teensy2/pins_PRINTRBOARD_REVF.h | 6 +-- 59 files changed, 231 insertions(+), 242 deletions(-) diff --git a/Marlin/src/HAL/AVR/HAL.h b/Marlin/src/HAL/AVR/HAL.h index dc0a4f2074..a22daf9b5c 100644 --- a/Marlin/src/HAL/AVR/HAL.h +++ b/Marlin/src/HAL/AVR/HAL.h @@ -43,13 +43,13 @@ // Default graphical display delays // #if F_CPU >= 20000000 - #define CPU_ST7920_DELAY_1 DELAY_NS(150) - #define CPU_ST7920_DELAY_2 DELAY_NS( 0) - #define CPU_ST7920_DELAY_3 DELAY_NS(150) + #define CPU_ST7920_DELAY_1 150 + #define CPU_ST7920_DELAY_2 0 + #define CPU_ST7920_DELAY_3 150 #elif F_CPU == 16000000 - #define CPU_ST7920_DELAY_1 DELAY_NS(125) - #define CPU_ST7920_DELAY_2 DELAY_NS( 0) - #define CPU_ST7920_DELAY_3 DELAY_NS(188) + #define CPU_ST7920_DELAY_1 125 + #define CPU_ST7920_DELAY_2 0 + #define CPU_ST7920_DELAY_3 188 #endif #ifndef pgm_read_ptr diff --git a/Marlin/src/HAL/LINUX/HAL.h b/Marlin/src/HAL/LINUX/HAL.h index 07ab85a9a0..79639f4993 100644 --- a/Marlin/src/HAL/LINUX/HAL.h +++ b/Marlin/src/HAL/LINUX/HAL.h @@ -63,9 +63,9 @@ uint8_t _getc(); extern MSerialT usb_serial; #define MYSERIAL1 usb_serial -#define CPU_ST7920_DELAY_1 DELAY_NS(600) -#define CPU_ST7920_DELAY_2 DELAY_NS(750) -#define CPU_ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 // // Interrupts diff --git a/Marlin/src/HAL/LPC1768/HAL.h b/Marlin/src/HAL/LPC1768/HAL.h index f0a1185ff2..fc2fc57378 100644 --- a/Marlin/src/HAL/LPC1768/HAL.h +++ b/Marlin/src/HAL/LPC1768/HAL.h @@ -50,9 +50,9 @@ extern "C" volatile uint32_t _millis; // // Default graphical display delays // -#define CPU_ST7920_DELAY_1 DELAY_NS(600) -#define CPU_ST7920_DELAY_2 DELAY_NS(750) -#define CPU_ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 typedef ForwardSerial1Class< decltype(UsbSerial) > DefaultSerial1; extern DefaultSerial1 USBSerial; diff --git a/Marlin/src/HAL/NATIVE_SIM/HAL.h b/Marlin/src/HAL/NATIVE_SIM/HAL.h index 400fafd711..235c24808c 100644 --- a/Marlin/src/HAL/NATIVE_SIM/HAL.h +++ b/Marlin/src/HAL/NATIVE_SIM/HAL.h @@ -99,9 +99,9 @@ extern MSerialT serial_stream_3; #endif -#define CPU_ST7920_DELAY_1 DELAY_NS(600) -#define CPU_ST7920_DELAY_2 DELAY_NS(750) -#define CPU_ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 // // Interrupts diff --git a/Marlin/src/HAL/STM32/HAL.h b/Marlin/src/HAL/STM32/HAL.h index d73f8b2d54..7a04c9ceeb 100644 --- a/Marlin/src/HAL/STM32/HAL.h +++ b/Marlin/src/HAL/STM32/HAL.h @@ -40,9 +40,9 @@ // // Default graphical display delays // -#define CPU_ST7920_DELAY_1 DELAY_NS(300) -#define CPU_ST7920_DELAY_2 DELAY_NS( 40) -#define CPU_ST7920_DELAY_3 DELAY_NS(340) +#define CPU_ST7920_DELAY_1 300 +#define CPU_ST7920_DELAY_2 40 +#define CPU_ST7920_DELAY_3 340 // // Serial Ports diff --git a/Marlin/src/HAL/STM32F1/HAL.h b/Marlin/src/HAL/STM32F1/HAL.h index 7efb761c28..1d30f43c48 100644 --- a/Marlin/src/HAL/STM32F1/HAL.h +++ b/Marlin/src/HAL/STM32F1/HAL.h @@ -54,9 +54,9 @@ // // Default graphical display delays // -#define CPU_ST7920_DELAY_1 DELAY_NS(300) -#define CPU_ST7920_DELAY_2 DELAY_NS( 40) -#define CPU_ST7920_DELAY_3 DELAY_NS(340) +#define CPU_ST7920_DELAY_1 300 +#define CPU_ST7920_DELAY_2 40 +#define CPU_ST7920_DELAY_3 340 #ifndef STM32_FLASH_SIZE #if ANY(MCU_STM32F103RE, MCU_STM32F103VE, MCU_STM32F103ZE) diff --git a/Marlin/src/HAL/TEENSY31_32/HAL.h b/Marlin/src/HAL/TEENSY31_32/HAL.h index d4b3c0a772..aa195845fb 100644 --- a/Marlin/src/HAL/TEENSY31_32/HAL.h +++ b/Marlin/src/HAL/TEENSY31_32/HAL.h @@ -36,9 +36,9 @@ #include -#define CPU_ST7920_DELAY_1 DELAY_NS(600) -#define CPU_ST7920_DELAY_2 DELAY_NS(750) -#define CPU_ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 //#undef MOTHERBOARD //#define MOTHERBOARD BOARD_TEENSY31_32 diff --git a/Marlin/src/HAL/TEENSY35_36/HAL.h b/Marlin/src/HAL/TEENSY35_36/HAL.h index 0b82a569f9..0093294a2a 100644 --- a/Marlin/src/HAL/TEENSY35_36/HAL.h +++ b/Marlin/src/HAL/TEENSY35_36/HAL.h @@ -37,9 +37,9 @@ #include #include -#define CPU_ST7920_DELAY_1 DELAY_NS(600) -#define CPU_ST7920_DELAY_2 DELAY_NS(750) -#define CPU_ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 // ------------------------ // Defines diff --git a/Marlin/src/HAL/TEENSY40_41/HAL.h b/Marlin/src/HAL/TEENSY40_41/HAL.h index 14f14bf446..ea51f15ba1 100644 --- a/Marlin/src/HAL/TEENSY40_41/HAL.h +++ b/Marlin/src/HAL/TEENSY40_41/HAL.h @@ -41,9 +41,9 @@ #include "../../feature/ethernet.h" #endif -#define CPU_ST7920_DELAY_1 DELAY_NS(600) -#define CPU_ST7920_DELAY_2 DELAY_NS(750) -#define CPU_ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 // ------------------------ // Defines diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 13af3c25f5..b6f76564f9 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -237,16 +237,16 @@ #elif ENABLED(CR10_STOCKDISPLAY) #define IS_RRD_FG_SC 1 - #define LCD_ST7920_DELAY_1 DELAY_NS(125) - #define LCD_ST7920_DELAY_2 DELAY_NS(125) - #define LCD_ST7920_DELAY_3 DELAY_NS(125) + #define LCD_ST7920_DELAY_1 125 + #define LCD_ST7920_DELAY_2 125 + #define LCD_ST7920_DELAY_3 125 #elif ENABLED(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING) #define IS_RRD_FG_SC 1 - #define LCD_ST7920_DELAY_1 DELAY_NS(150) - #define LCD_ST7920_DELAY_2 DELAY_NS(150) - #define LCD_ST7920_DELAY_3 DELAY_NS(150) + #define LCD_ST7920_DELAY_1 150 + #define LCD_ST7920_DELAY_2 150 + #define LCD_ST7920_DELAY_3 150 #elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, BQ_LCD_SMART_CONTROLLER, K3D_FULL_GRAPHIC_SMART_CONTROLLER) diff --git a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp index 20c8cec0cf..9367ed75a9 100644 --- a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp @@ -36,11 +36,61 @@ // Optimize this code with -O3 #pragma GCC optimize (3) +#ifndef ST7920_DELAY_1 + #ifndef LCD_ST7920_DELAY_1 + #define LCD_ST7920_DELAY_1 0 + #endif + #ifndef BOARD_ST7920_DELAY_1 + #define BOARD_ST7920_DELAY_1 0 + #endif + #ifndef CPU_ST7920_DELAY_1 + #define CPU_ST7920_DELAY_1 0 + #endif + #if LCD_ST7920_DELAY_1 || BOARD_ST7920_DELAY_1 || CPU_ST7920_DELAY_1 + #define ST7920_DELAY_1 DELAY_NS(_MAX(LCD_ST7920_DELAY_1, BOARD_ST7920_DELAY_1, CPU_ST7920_DELAY_1)) + #else + #define ST7920_DELAY_1 + #endif +#endif +#ifndef ST7920_DELAY_2 + #ifndef LCD_ST7920_DELAY_2 + #define LCD_ST7920_DELAY_2 0 + #endif + #ifndef BOARD_ST7920_DELAY_2 + #define BOARD_ST7920_DELAY_2 0 + #endif + #ifndef CPU_ST7920_DELAY_2 + #define CPU_ST7920_DELAY_2 0 + #endif + #if LCD_ST7920_DELAY_2 || BOARD_ST7920_DELAY_2 || CPU_ST7920_DELAY_2 + #define ST7920_DELAY_2 DELAY_NS(_MAX(LCD_ST7920_DELAY_2, BOARD_ST7920_DELAY_2, CPU_ST7920_DELAY_2)) + #else + #define ST7920_DELAY_2 + #endif +#endif +#ifndef ST7920_DELAY_3 + #ifndef LCD_ST7920_DELAY_3 + #define LCD_ST7920_DELAY_3 0 + #endif + #ifndef BOARD_ST7920_DELAY_3 + #define BOARD_ST7920_DELAY_3 0 + #endif + #ifndef CPU_ST7920_DELAY_3 + #define CPU_ST7920_DELAY_3 0 + #endif + #if LCD_ST7920_DELAY_3 || BOARD_ST7920_DELAY_3 || CPU_ST7920_DELAY_3 + #define ST7920_DELAY_3 DELAY_NS(_MAX(LCD_ST7920_DELAY_3, BOARD_ST7920_DELAY_3, CPU_ST7920_DELAY_3)) + #else + #define ST7920_DELAY_3 + #endif +#endif + #ifdef ARDUINO_ARCH_STM32F1 #define ST7920_DAT(V) !!((V) & 0x80) #else #define ST7920_DAT(V) ((V) & 0x80) #endif + #define ST7920_SND_BIT do{ \ WRITE(ST7920_CLK_PIN, LOW); ST7920_DELAY_1; \ WRITE(ST7920_DAT_PIN, ST7920_DAT(val)); ST7920_DELAY_2; \ diff --git a/Marlin/src/pins/mega/pins_SILVER_GATE.h b/Marlin/src/pins/mega/pins_SILVER_GATE.h index 0828b32aa9..7b4f53a764 100644 --- a/Marlin/src/pins/mega/pins_SILVER_GATE.h +++ b/Marlin/src/pins/mega/pins_SILVER_GATE.h @@ -86,9 +86,9 @@ #define KILL_PIN 21 #define HOME_PIN 28 #endif - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 0 #endif #endif diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index aa2bc07908..6b5c695e85 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -1221,35 +1221,7 @@ // // Default DOGLCD SPI delays // -#if ENABLED(U8GLIB_ST7920) - #ifndef ST7920_DELAY_1 - #ifdef LCD_ST7920_DELAY_1 - #define ST7920_DELAY_1 LCD_ST7920_DELAY_1 - #elif defined(BOARD_ST7920_DELAY_1) - #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1 - #elif defined(CPU_ST7920_DELAY_1) - #define ST7920_DELAY_1 CPU_ST7920_DELAY_1 - #endif - #endif - #ifndef ST7920_DELAY_2 - #ifdef LCD_ST7920_DELAY_2 - #define ST7920_DELAY_2 LCD_ST7920_DELAY_2 - #elif defined(BOARD_ST7920_DELAY_2) - #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2 - #elif defined(CPU_ST7920_DELAY_2) - #define ST7920_DELAY_2 CPU_ST7920_DELAY_2 - #endif - #endif - #ifndef ST7920_DELAY_3 - #ifdef LCD_ST7920_DELAY_3 - #define ST7920_DELAY_3 LCD_ST7920_DELAY_3 - #elif defined(BOARD_ST7920_DELAY_3) - #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3 - #elif defined(CPU_ST7920_DELAY_3) - #define ST7920_DELAY_3 CPU_ST7920_DELAY_3 - #endif - #endif -#else +#if DISABLED(U8GLIB_ST7920) #undef ST7920_DELAY_1 #undef ST7920_DELAY_2 #undef ST7920_DELAY_3 diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index dbb34f6585..25decbf035 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -206,9 +206,9 @@ #endif // HAS_WIRED_LCD #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 0 #endif #undef MK3_FAN_PINS diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index 5d8ffc07aa..48c68d55f9 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -202,7 +202,7 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 0 #endif diff --git a/Marlin/src/pins/rambo/pins_MINIRAMBO.h b/Marlin/src/pins/rambo/pins_MINIRAMBO.h index 6257550697..c496878908 100644 --- a/Marlin/src/pins/rambo/pins_MINIRAMBO.h +++ b/Marlin/src/pins/rambo/pins_MINIRAMBO.h @@ -194,7 +194,7 @@ #endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 0 #endif diff --git a/Marlin/src/pins/rambo/pins_RAMBO.h b/Marlin/src/pins/rambo/pins_RAMBO.h index a77cb3d93f..8153103a38 100644 --- a/Marlin/src/pins/rambo/pins_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_RAMBO.h @@ -271,7 +271,7 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(0) - #define BOARD_ST7920_DELAY_3 DELAY_NS(0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 0 + #define BOARD_ST7920_DELAY_3 0 #endif diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h index 3f38ecb211..316323ef9c 100644 --- a/Marlin/src/pins/ramps/pins_3DRAG.h +++ b/Marlin/src/pins/ramps/pins_3DRAG.h @@ -109,9 +109,9 @@ #endif // IS_ULTRA_LCD && IS_NEWPANEL #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(188) - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 188 + #define BOARD_ST7920_DELAY_3 0 #endif /** diff --git a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h index 5b3ed4c6a5..14f54cdcf3 100644 --- a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h +++ b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h @@ -126,7 +126,7 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_3 DELAY_NS(189) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 0 + #define BOARD_ST7920_DELAY_3 189 #endif diff --git a/Marlin/src/pins/ramps/pins_DAGOMA_F5.h b/Marlin/src/pins/ramps/pins_DAGOMA_F5.h index 4f25110ca2..4bebd6ded6 100644 --- a/Marlin/src/pins/ramps/pins_DAGOMA_F5.h +++ b/Marlin/src/pins/ramps/pins_DAGOMA_F5.h @@ -41,9 +41,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS(250) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 250 #endif // diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h index 0398d36f93..94c4551fc2 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h @@ -200,7 +200,7 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(200) - #define BOARD_ST7920_DELAY_2 DELAY_NS(200) - #define BOARD_ST7920_DELAY_3 DELAY_NS(200) + #define BOARD_ST7920_DELAY_1 200 + #define BOARD_ST7920_DELAY_2 200 + #define BOARD_ST7920_DELAY_3 200 #endif diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index e54209ed6a..bd69e167dc 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -195,9 +195,9 @@ #define BTN_EN1 28 #define BTN_EN2 10 #define BTN_ENC 17 - #define BOARD_ST7920_DELAY_1 DELAY_NS(250) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS(250) + #define BOARD_ST7920_DELAY_1 250 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 250 #else #define SERVO0_PIN 29 // free for BLTouch/3D-Touch #define BEEPER_PIN 17 @@ -207,9 +207,9 @@ #define BTN_EN1 11 #define BTN_EN2 10 #define BTN_ENC 16 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(63) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 63 + #define BOARD_ST7920_DELAY_3 125 #endif #endif diff --git a/Marlin/src/pins/sanguino/pins_MELZI.h b/Marlin/src/pins/sanguino/pins_MELZI.h index 8f2729f8f0..31583fd109 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI.h +++ b/Marlin/src/pins/sanguino/pins_MELZI.h @@ -34,13 +34,13 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 #endif #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(188) + #define BOARD_ST7920_DELAY_2 188 #endif #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_3 0 #endif #endif diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index 81ccf5977e..3c6dd901c0 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -37,9 +37,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #include "pins_MELZI.h" diff --git a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h index e88a38561d..8abed5c30c 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h @@ -29,9 +29,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 0 #endif #include "pins_MELZI.h" diff --git a/Marlin/src/pins/sanguino/pins_MELZI_V2.h b/Marlin/src/pins/sanguino/pins_MELZI_V2.h index c1fb7fb6f7..badf53a641 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_V2.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_V2.h @@ -26,9 +26,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(400) - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 400 + #define BOARD_ST7920_DELAY_3 0 #endif #include "pins_MELZI.h" diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index 6aa3372b3f..650357ee9e 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -203,9 +203,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #endif diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index 2ce1d49bb8..77eb6aaf14 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -156,9 +156,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif // diff --git a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h index 7d0e15f57a..3f02d7082f 100644 --- a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h @@ -180,9 +180,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h index 797e13fd07..b3da8d884e 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h @@ -159,9 +159,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h index 64b1c6c040..3650ffde5c 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h @@ -167,9 +167,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h index 992fc36f92..56dda2b143 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h @@ -164,9 +164,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h index d33ce461fe..c9a20fd66e 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h @@ -169,9 +169,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 846a21eea5..c5080b5227 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -342,9 +342,9 @@ #endif - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index d6a4bb92dc..eb6cf031b5 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -223,13 +223,13 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 #endif #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) + #define BOARD_ST7920_DELAY_2 125 #endif #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_3 125 #endif #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h index 6373d70e38..6388e1723c 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h @@ -114,9 +114,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h index 73fefddf8f..416a061412 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h @@ -138,9 +138,9 @@ #endif // !MKS_MINI_12864 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif // HAS_WIRED_LCD 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 6ffb4556b5..8be6494b82 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -379,9 +379,9 @@ #endif #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #endif // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 8f03a3678f..fdee796692 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -301,9 +301,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #define HAS_SPI_FLASH 1 diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h index 0d413d3651..d4f77d5f84 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h @@ -201,9 +201,9 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_06_PIN #define BTN_ENC EXP1_04_PIN - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(200) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 200 + #define BOARD_ST7920_DELAY_3 125 #elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h index a7a1dacd5b..daacd0c124 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h @@ -333,9 +333,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 125 #endif // Remap SERVO0 PIN for BLTouch diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h index ba6bf8aa7b..e0b2f6adfc 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h @@ -306,9 +306,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(200) // Tclk_fall <200ns - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) // Tdata_width >200ns - #define BOARD_ST7920_DELAY_3 DELAY_NS(200) // Tclk_rise <200ns + #define BOARD_ST7920_DELAY_1 200 // Tclk_fall <200ns + #define BOARD_ST7920_DELAY_2 250 // Tdata_width >200ns + #define BOARD_ST7920_DELAY_3 200 // Tclk_rise <200ns #endif // Remap SERVO0 PIN for BLTouch diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index bb283201e4..86851a7840 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -286,9 +286,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index 8d828f9e27..eb0c3bdbb9 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -207,11 +207,6 @@ #define LCD_PINS_ENABLE PE11 #define LCD_PINS_D4 PE10 - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 - #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. Comment out this line to continue." @@ -283,9 +278,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index 5a1efc252b..68948f7de9 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -425,11 +425,6 @@ #define LCD_PINS_ENABLE EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 - #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_04_PIN #define DOGLCD_CS EXP1_05_PIN @@ -489,9 +484,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif #endif // HAS_WIRED_LCD 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 d133a45718..ab0a7dd962 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -433,11 +433,6 @@ #define LCD_PINS_ENABLE EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 - #else #define LCD_PINS_RS EXP1_07_PIN @@ -484,9 +479,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(120) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 80) - #define BOARD_ST7920_DELAY_3 DELAY_NS(580) + #define BOARD_ST7920_DELAY_1 120 + #define BOARD_ST7920_DELAY_2 80 + #define BOARD_ST7920_DELAY_3 580 #endif #if HAS_SPI_TFT diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index 8690f41ec9..72154be2ee 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -446,11 +446,6 @@ #define LCD_PINS_ENABLE EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 - #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_04_PIN @@ -506,13 +501,13 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 #endif #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS( 90) + #define BOARD_ST7920_DELAY_2 90 #endif #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_3 600 #endif #endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index 30163dc61d..a05f4fb5b9 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -430,11 +430,6 @@ #define LCD_PINS_ENABLE EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 - #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_04_PIN @@ -490,13 +485,13 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(120) + #define BOARD_ST7920_DELAY_1 120 #endif #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS( 80) + #define BOARD_ST7920_DELAY_2 80 #endif #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(580) + #define BOARD_ST7920_DELAY_3 580 #endif #endif diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index cbed56d202..8a9ac56e9e 100644 --- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -306,7 +306,7 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index c922f13c60..3fe7449330 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -192,11 +192,6 @@ #define LCD_PINS_ENABLE EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 - #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_04_PIN @@ -251,9 +246,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif #if ENABLED(TOUCH_UI_FTDI_EVE) diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index da83ade4e0..6b6f644159 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -315,9 +315,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(640) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 640 #endif #ifndef RGB_LED_R_PIN diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h index 3b6a3f74f6..8fa211dc95 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h @@ -369,9 +369,9 @@ #define LCD_PINS_D7 EXP1_03_PIN #endif - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 731eaee5ee..5387052d40 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -413,9 +413,9 @@ #define LCD_PINS_D7 EXP1_03_PIN #endif - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif // !MKS_MINI_12864 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 c28da71347..46dec71c11 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -371,9 +371,9 @@ #define LCD_PINS_D7 EXP1_03_PIN #endif - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h index af0f5fa17c..4c0e3515f6 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h @@ -173,7 +173,7 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(640) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 640 #endif diff --git a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h index c04341a243..bff3f5b6ee 100644 --- a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h +++ b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h @@ -225,12 +225,9 @@ #define LCD_PINS_D4 EXP1_05_PIN //#define KILL_PIN -1 - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_1 DELAY_NS(600) - #define BOARD_ST7920_DELAY_2 DELAY_NS(750) - #define BOARD_ST7920_DELAY_3 DELAY_NS(750) + #define BOARD_ST7920_DELAY_1 600 + #define BOARD_ST7920_DELAY_2 750 + #define BOARD_ST7920_DELAY_3 750 #elif ENABLED(MKS_MINI_12864) /** ______ diff --git a/Marlin/src/pins/stm32f4/pins_VAKE403D.h b/Marlin/src/pins/stm32f4/pins_VAKE403D.h index 280f98eae8..f936df2c2c 100644 --- a/Marlin/src/pins/stm32f4/pins_VAKE403D.h +++ b/Marlin/src/pins/stm32f4/pins_VAKE403D.h @@ -184,7 +184,7 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif diff --git a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h index 217664e5bc..c41b5ab1de 100644 --- a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h +++ b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h @@ -191,7 +191,7 @@ #define BTN_EN1 PF13 // BTN_EN1 #define BTN_EN2 PE9 // BTN_EN2 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(63) - #define BOARD_ST7920_DELAY_3 DELAY_NS(780) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 63 + #define BOARD_ST7920_DELAY_3 780 #endif diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h index 539a3bb8f3..76b98ccbeb 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h @@ -245,9 +245,9 @@ //#define MISO 23 // 13 B3 ICSP-06 EXP2-05 // Alter timing for graphical display - #define BOARD_ST7920_DELAY_1 DELAY_NS(313) - #define BOARD_ST7920_DELAY_2 DELAY_NS(313) - #define BOARD_ST7920_DELAY_3 DELAY_NS(313) + #define BOARD_ST7920_DELAY_1 313 + #define BOARD_ST7920_DELAY_2 313 + #define BOARD_ST7920_DELAY_3 313 #else