Board-based LCD delays

2.0.x
Scott Lahteine 5 years ago
parent 6e0bcb80a2
commit 7010f92c4b

@ -1165,4 +1165,20 @@
#define Z3_MS3_PIN -1 #define Z3_MS3_PIN -1
#endif #endif
#if HAS_GRAPHICAL_LCD
#if !defined(ST7920_DELAY_1) && defined(BOARD_ST7920_DELAY_1)
#define ST7920_DELAY_1 BOARD_ST7920_DELAY_1
#endif
#if !defined(ST7920_DELAY_2) && defined(BOARD_ST7920_DELAY_2)
#define ST7920_DELAY_2 BOARD_ST7920_DELAY_2
#endif
#if !defined(ST7920_DELAY_3) && defined(BOARD_ST7920_DELAY_3)
#define ST7920_DELAY_3 BOARD_ST7920_DELAY_3
#endif
#else
#undef ST7920_DELAY_1
#undef ST7920_DELAY_2
#undef ST7920_DELAY_3
#endif
#undef HAS_FREE_AUX2_PINS #undef HAS_FREE_AUX2_PINS

@ -175,15 +175,9 @@
#define BTN_EN1 11 #define BTN_EN1 11
#define BTN_EN2 10 #define BTN_EN2 10
#define BTN_ENC 16 #define BTN_ENC 16
#ifndef ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#define ST7920_DELAY_1 DELAY_NS(0) #define BOARD_ST7920_DELAY_2 DELAY_NS(63)
#endif #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(63)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(125)
#endif
#define STD_ENCODER_PULSES_PER_STEP 4 #define STD_ENCODER_PULSES_PER_STEP 4
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1 #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
#endif #endif

@ -59,14 +59,10 @@
#endif #endif
// Alter timing for graphical display // Alter timing for graphical display
#ifndef ST7920_DELAY_1 #if HAS_GRAPHICAL_LCD
#define ST7920_DELAY_1 DELAY_NS(125) #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#ifndef ST7920_DELAY_2 #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#define ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(125)
#endif #endif
#if ENABLED(MINIPANEL) #if ENABLED(MINIPANEL)

@ -44,12 +44,8 @@
#define BTN_ENC 28 #define BTN_ENC 28
// Alter timing for graphical display // Alter timing for graphical display
#ifndef ST7920_DELAY_1 #if HAS_GRAPHICAL_LCD
#define ST7920_DELAY_1 DELAY_NS(125) #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#ifndef ST7920_DELAY_2 #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#define ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(125)
#endif #endif

@ -51,12 +51,8 @@
#define BTN_EN2 11 #define BTN_EN2 11
#define BTN_ENC 26 #define BTN_ENC 26
#ifndef ST7920_DELAY_1 #if HAS_GRAPHICAL_LCD
#define ST7920_DELAY_1 DELAY_NS(0) #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#endif #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#ifndef ST7920_DELAY_2 #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#define ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(0)
#endif #endif

@ -235,15 +235,9 @@
#define BTN_EN1 29 #define BTN_EN1 29
#define BTN_EN2 30 #define BTN_EN2 30
#ifndef ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#define ST7920_DELAY_1 DELAY_NS(0) #define BOARD_ST7920_DELAY_2 DELAY_NS(188)
#endif #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(188)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(0)
#endif
#elif ENABLED(ZONESTAR_LCD) // For the Tronxy Melzi boards #elif ENABLED(ZONESTAR_LCD) // For the Tronxy Melzi boards

@ -243,15 +243,9 @@
// Alter timing for graphical display // Alter timing for graphical display
#if HAS_GRAPHICAL_LCD #if HAS_GRAPHICAL_LCD
#ifndef ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#define ST7920_DELAY_1 DELAY_NS(96) #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#endif #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(600)
#endif
#endif #endif
#endif // HAS_SPI_LCD #endif // HAS_SPI_LCD

@ -209,13 +209,8 @@
#define ON_BOARD_SPI_DEVICE 1 //SPI1 #define ON_BOARD_SPI_DEVICE 1 //SPI1
#define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card
#ifndef ST7920_DELAY_1 #if HAS_GRAPHICAL_LCD
#define ST7920_DELAY_1 DELAY_NS(125) #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif #endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(125)
#endif

@ -260,15 +260,9 @@
// Alter timing for graphical display // Alter timing for graphical display
#if HAS_GRAPHICAL_LCD #if HAS_GRAPHICAL_LCD
#ifndef ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#define ST7920_DELAY_1 DELAY_NS(96) #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#endif #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(600)
#endif
#endif #endif
#endif // HAS_SPI_LCD #endif // HAS_SPI_LCD

@ -183,14 +183,8 @@
// //
// ST7920 Delays // ST7920 Delays
// //
#ifndef ST7920_DELAY_1 #if HAS_GRAPHICAL_LCD
#define ST7920_DELAY_1 DELAY_NS(96) #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#endif #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(715)
#endif #endif

@ -153,14 +153,10 @@
//#define LCD_UART_RX PD9 //#define LCD_UART_RX PD9
#endif #endif
#ifndef ST7920_DELAY_1 #if HAS_GRAPHICAL_LCD
#define ST7920_DELAY_1 DELAY_NS(96) #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#endif #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#ifndef ST7920_DELAY_2 #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#define ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(715)
#endif #endif
#endif // HAS_SPI_LCD #endif // HAS_SPI_LCD

@ -170,12 +170,8 @@
// //
// ST7920 Delays // ST7920 Delays
// //
#ifndef ST7920_DELAY_1 #if HAS_GRAPHICAL_LCD
#define ST7920_DELAY_1 DELAY_NS(96) #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#endif #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#ifndef ST7920_DELAY_2 #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#define ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(715)
#endif #endif

@ -167,12 +167,8 @@
// //
// ST7920 Delays // ST7920 Delays
// //
#ifndef ST7920_DELAY_1 #if HAS_GRAPHICAL_LCD
#define ST7920_DELAY_1 DELAY_NS(96) #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#endif #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#ifndef ST7920_DELAY_2 #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#define ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(715)
#endif #endif

@ -132,12 +132,8 @@
#define MOSI_PIN P1B5 #define MOSI_PIN P1B5
#define SS_PIN PA15 #define SS_PIN PA15
#ifndef ST7920_DELAY_1 #if HAS_GRAPHICAL_LCD
#define ST7920_DELAY_1 DELAY_NS(125) #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#ifndef ST7920_DELAY_2 #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#define ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(125)
#endif #endif

@ -247,15 +247,9 @@
//#define MISO 23 // 13 B3 ICSP-06 EXP2-05 //#define MISO 23 // 13 B3 ICSP-06 EXP2-05
// increase delays // increase delays
#ifndef ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 DELAY_NS(313)
#define ST7920_DELAY_1 DELAY_NS(313) #define BOARD_ST7920_DELAY_2 DELAY_NS(313)
#endif #define BOARD_ST7920_DELAY_3 DELAY_NS(313)
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(313)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(313)
#endif
#else #else

Loading…
Cancel
Save