Skip to content

Commit

Permalink
Adjust board ST7920 delays
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Aug 28, 2021
1 parent 7a3b816 commit a9dff00
Show file tree
Hide file tree
Showing 49 changed files with 250 additions and 351 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/pins/esp32/pins_MRR_ESPE.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
// LCDs and Controllers //
//////////////////////////

#if HAS_MARLINUI_U8GLIB
#if HAS_WIRED_LCD

#define LCD_PINS_RS 13
#define LCD_PINS_ENABLE 17
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
* ------ ------
* EXP2 EXP1
*/

#define EXP1_03_PIN -1
#define EXP1_04_PIN -1
#define EXP1_05_PIN -1
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@
* ------ ------
* EXP1 EXP2
*/

#define EXP1_03_PIN P1_23
#define EXP1_04_PIN P1_22
#define EXP1_05_PIN P1_21
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@
* ------ ------
* EXP1 EXP2
*/

#define EXP1_03_PIN P1_22
#define EXP1_04_PIN P1_00
#define EXP1_05_PIN P0_17
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@
* ------
* EXP
*/

#define EXP1_03_PIN P0_18
#define EXP1_04_PIN P0_17
#define EXP1_05_PIN P0_15
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/mega/pins_OVERLORD.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
//
// LCD / Controller
//
#if HAS_MARLINUI_U8GLIB
#if HAS_WIRED_LCD
// OVERLORD OLED pins
#define LCD_PINS_RS 20
#define LCD_PINS_D5 21
Expand Down
5 changes: 4 additions & 1 deletion Marlin/src/pins/mega/pins_SILVER_GATE.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
#define HEATER_BED_PIN 8
#define TEMP_BED_PIN 6

#if HAS_MARLINUI_U8GLIB
#if HAS_WIRED_LCD
#if ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920
#define LCD_PINS_RS 30
#define LCD_PINS_ENABLE 20
Expand All @@ -86,6 +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)
#endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/pins_postprocess.h
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@
//
// Default DOGLCD SPI delays
//
#if HAS_MARLINUI_U8GLIB
#if ENABLED(U8GLIB_ST7920)
#ifndef ST7920_DELAY_1
#ifdef LCD_ST7920_DELAY_1
#define ST7920_DELAY_1 LCD_ST7920_DELAY_1
Expand Down
6 changes: 6 additions & 0 deletions Marlin/src/pins/rambo/pins_EINSY_RAMBO.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,10 @@
#endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
#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)
#endif

#undef MK3_FAN_PINS
7 changes: 7 additions & 0 deletions Marlin/src/pins/rambo/pins_EINSY_RETRO.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,10 @@
#endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE

#endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE

// 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)
#endif
6 changes: 6 additions & 0 deletions Marlin/src/pins/rambo/pins_MINIRAMBO.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,9 @@
#endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL

#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)
#endif
7 changes: 7 additions & 0 deletions Marlin/src/pins/rambo/pins_RAMBO.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,10 @@
#endif // !IS_NEWPANEL

#endif // HAS_WIRED_LCD

// 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)
#endif
6 changes: 6 additions & 0 deletions Marlin/src/pins/ramps/pins_3DRAG.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@

#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)
#endif

/**
* M3/M4/M5 - Spindle/Laser Control
*
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,10 @@
#undef HEATER_BED_PIN
#define HEATER_BED_PIN 8
#endif

// 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)
#endif
6 changes: 2 additions & 4 deletions Marlin/src/pins/ramps/pins_DAGOMA_F5.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@
#define FIL_RUNOUT2_PIN 14
#endif

//
// LCD delays
//
#if HAS_MARLINUI_U8GLIB
// 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)
Expand Down
15 changes: 5 additions & 10 deletions Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,9 @@
#define LCD_PINS_D7 29
#endif

#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(200)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(200)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(200)
#endif
// 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)
#endif
13 changes: 13 additions & 0 deletions Marlin/src/pins/sanguino/pins_MELZI.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,17 @@

#define IS_MELZI 1

// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS( 0)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(188)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS( 0)
#endif
#endif

#include "pins_SANGUINOLOLU_12.h"
14 changes: 4 additions & 10 deletions Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,10 @@
#define BOARD_INFO_NAME "Melzi (Creality)"

// Alter timing for graphical display
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#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)
#endif

#include "pins_MELZI.h"
Expand Down
13 changes: 0 additions & 13 deletions Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,6 @@

#define BOARD_INFO_NAME "Melzi (Malyan)"

// Alter timing for graphical display
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
#endif

#include "pins_MELZI.h"

#undef LCD_SDSS
Expand Down
15 changes: 5 additions & 10 deletions Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,11 @@

#define BOARD_INFO_NAME "Melzi (Tronxy)"

#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#endif
// 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)
#endif

#include "pins_MELZI.h"
Expand Down
15 changes: 5 additions & 10 deletions Marlin/src/pins/sanguino/pins_MELZI_V2.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,11 @@

#define BOARD_INFO_NAME "Melzi V2"

#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(400)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#endif
// 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)
#endif

#include "pins_MELZI.h"
23 changes: 0 additions & 23 deletions Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,6 @@
#define KILL_PIN 10
#define BEEPER_PIN 27

#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(188)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#endif

#elif ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0

#if IS_MELZI
Expand All @@ -185,19 +175,6 @@
// Marlin so this can be used for BEEPER_PIN. You can use this pin
// with M42 instead of BEEPER_PIN.
#define BEEPER_PIN 27

#if IS_RRD_FG_SC
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(188)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#endif
#endif

#else // Sanguinololu >=1.3
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17
Expand Down
7 changes: 3 additions & 4 deletions Marlin/src/pins/sanguino/pins_ZMIB_V2.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,9 @@
#endif
#define LCD_PINS_D4 10 // ST7920_CLK_PIN LCD_PIN_ENABLE (PIN6 of LCD module)

// Alter timing for graphical display
#define ST7920_DELAY_1 DELAY_2_NOP
#define ST7920_DELAY_2 DELAY_2_NOP
#define ST7920_DELAY_3 DELAY_2_NOP
#define BOARD_ST7920_DELAY_1 DELAY_2_NOP
#define BOARD_ST7920_DELAY_2 DELAY_2_NOP
#define BOARD_ST7920_DELAY_3 DELAY_2_NOP

#elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306)
//
Expand Down
15 changes: 5 additions & 10 deletions Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,11 @@

#endif // !FYSETC_MINI_12864

#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
// 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)
#endif

#endif
Expand Down
14 changes: 4 additions & 10 deletions Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,10 @@
#endif

// Alter timing for graphical display
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#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)
#endif

//
Expand Down
Loading

0 comments on commit a9dff00

Please sign in to comment.