Easier override of ST7920 LCD timing

This commit is contained in:
Scott Lahteine 2018-03-17 02:40:20 -05:00
parent ab769590a1
commit 6689884910
5 changed files with 45 additions and 15 deletions

View file

@ -176,9 +176,15 @@
#define BTN_EN1 11 #define BTN_EN1 11
#define BTN_EN2 10 #define BTN_EN2 10
#define BTN_ENC 16 #define BTN_ENC 16
#define ST7920_DELAY_1 DELAY_0_NOP #ifndef ST7920_DELAY_1
#define ST7920_DELAY_2 DELAY_1_NOP #define ST7920_DELAY_1 DELAY_0_NOP
#define ST7920_DELAY_3 DELAY_2_NOP #endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_1_NOP
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_2_NOP
#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

View file

@ -54,9 +54,15 @@
#define FIL_RUNOUT_PIN -1 // Uses Beeper/LED Pin Pulled to GND #define FIL_RUNOUT_PIN -1 // Uses Beeper/LED Pin Pulled to GND
// Alter timing for graphical display // Alter timing for graphical display
#define ST7920_DELAY_1 DELAY_2_NOP #ifndef ST7920_DELAY_1
#define ST7920_DELAY_2 DELAY_2_NOP #define ST7920_DELAY_1 DELAY_2_NOP
#define ST7920_DELAY_3 DELAY_2_NOP #endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_2_NOP
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_2_NOP
#endif
#if ENABLED(MINIPANEL) #if ENABLED(MINIPANEL)
#undef DOGLCD_CS #undef DOGLCD_CS

View file

@ -43,6 +43,12 @@
#define BTN_ENC 28 #define BTN_ENC 28
// Alter timing for graphical display // Alter timing for graphical display
#define ST7920_DELAY_1 DELAY_2_NOP #ifndef ST7920_DELAY_1
#define ST7920_DELAY_2 DELAY_2_NOP #define ST7920_DELAY_1 DELAY_2_NOP
#define ST7920_DELAY_3 DELAY_2_NOP #endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_2_NOP
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_2_NOP
#endif

View file

@ -50,6 +50,12 @@
#define BTN_EN2 11 #define BTN_EN2 11
#define BTN_ENC 26 #define BTN_ENC 26
#define ST7920_DELAY_1 DELAY_0_NOP #ifndef ST7920_DELAY_1
#define ST7920_DELAY_2 DELAY_2_NOP #define ST7920_DELAY_1 DELAY_0_NOP
#define ST7920_DELAY_3 DELAY_0_NOP #endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_2_NOP
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_0_NOP
#endif

View file

@ -243,9 +243,15 @@
//#define MISO 23 // 13 B3 ICSP-06 EXP2-05 //#define MISO 23 // 13 B3 ICSP-06 EXP2-05
// increase delays // increase delays
#define ST7920_DELAY_1 DELAY_5_NOP #ifndef ST7920_DELAY_1
#define ST7920_DELAY_2 DELAY_5_NOP #define ST7920_DELAY_1 DELAY_5_NOP
#define ST7920_DELAY_3 DELAY_5_NOP #endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_5_NOP
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_5_NOP
#endif
#else #else