🎨 EXP headers, ST7920 delays (#22641)
This commit is contained in:
		
				
					committed by
					
						
						Scott Lahteine
					
				
			
			
				
	
			
			
			
						parent
						
							9b0e196ba2
						
					
				
				
					commit
					7704d84419
				
			@@ -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"
 | 
			
		||||
 
 | 
			
		||||
@@ -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"
 | 
			
		||||
@@ -137,11 +131,11 @@
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *    EXP1 Connector                      EXP1 as CR10 STOCKDISPLAY
 | 
			
		||||
 *        -----                                      -----
 | 
			
		||||
 *   PA4 | 6 5 | PC0                     BEEPER_PIN | 6 5 | BTN_ENC
 | 
			
		||||
 *   PD3 | 7 4 | RESET                      BTN_EN1 | 7 4 | RESET
 | 
			
		||||
 *   PD2   8 3 | PA1                        BTN_EN2   8 3 | LCD_PINS_D4 (ST9720 CLK)
 | 
			
		||||
 *   PA3 | 9 2 | PC1        (ST9720 CS) LCD_PINS_RS | 9 2 | LCD_PINS_ENABLE (ST9720 DAT)
 | 
			
		||||
 *   GND |10 1 | 5V                             GND |10 1 | 5V
 | 
			
		||||
 *        -----                                   -----
 | 
			
		||||
 *        ------                                      ------
 | 
			
		||||
 *   PA4 |10  9 | PC0                     BEEPER_PIN |10  9 | BTN_ENC
 | 
			
		||||
 *   PD3 | 8  7 | RESET                      BTN_EN1 | 8  7 | RESET
 | 
			
		||||
 *   PD2   6  5 | PA1                        BTN_EN2   6  5 | LCD_PINS_D4     (ST9720 CLK)
 | 
			
		||||
 *   PA3 | 4  3 | PC1        (ST9720 CS) LCD_PINS_RS | 4  3 | LCD_PINS_ENABLE (ST9720 DAT)
 | 
			
		||||
 *   GND | 2  1 | 5V                             GND | 2  1 | 5V
 | 
			
		||||
 *        ------                                      ------
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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"
 | 
			
		||||
 
 | 
			
		||||
@@ -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"
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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)
 | 
			
		||||
  //
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user