🎨 EXP headers, ST7920 delays (#22641)
This commit is contained in:
committed by
Scott Lahteine
parent
9b0e196ba2
commit
7704d84419
@ -68,7 +68,7 @@
|
||||
#define E0_DIR_PIN PB0
|
||||
#define E0_ENABLE_PIN PC4
|
||||
|
||||
#if ENABLED(TMC_USE_SW_SPI)
|
||||
#if ENABLED(TMC_USE_SW_SPI) // Shared with EXP2
|
||||
#ifndef TMC_SW_SCK
|
||||
#define TMC_SW_SCK PB3
|
||||
#endif
|
||||
@ -93,33 +93,48 @@
|
||||
#define TEMP_BED_PIN PB1 // Analog Input
|
||||
#define TEMP_0_PIN PA0 // Analog Input
|
||||
|
||||
//
|
||||
// LCD Pins
|
||||
//
|
||||
|
||||
/**
|
||||
* ----- -----
|
||||
* NC | · · | GND 5V | · · | GND
|
||||
* RESET | · · | PB9 (SD_DETECT) (LCD_D7) PC14 | · · | PC15 (LCD_D6)
|
||||
* (MOSI) PB5 | · · | PB8 (BTN_EN2) (LCD_D5) PB7 | · · | PC13 (LCD_D4)
|
||||
* (SD_SS) PA15 | · · | PD2 (BTN_EN1) (LCD_RS) PC12 | · · | PB6 (LCD_EN)
|
||||
* (SCK) PB3 | · · | PB4 (MISO) (BTN_ENC) PC11 | · · | PC10 (BEEPER)
|
||||
* ----- -----
|
||||
* EXP2 EXP1
|
||||
/** ------ ------
|
||||
* (BEEPER) PC10 |10 9 | PC11 (BTN_ENC) (MISO) PB4 |10 9 | PB3 (SCK)
|
||||
* (LCD_EN) PB6 | 8 7 | PC12 (LCD_RS) (BTN_EN1) PD2 | 8 7 | PA15 (SD_SS)
|
||||
* (LCD_D4) PC13 | 6 5 | PB7 (LCD_D5) (BTN_EN2) PB8 | 6 5 | PB5 (MOSI)
|
||||
* (LCD_D6) PC15 | 4 3 | PC14 (LCD_D7) (SD_DETECT) PB9 | 4 3 | RESET
|
||||
* GND | 2 1 | 5V GND | 2 1 | NC
|
||||
* ------ ------
|
||||
* EXP1 EXP2
|
||||
*/
|
||||
#define EXP1_03_PIN PC14
|
||||
#define EXP1_04_PIN PC15
|
||||
#define EXP1_05_PIN PB7
|
||||
#define EXP1_06_PIN PC13
|
||||
#define EXP1_07_PIN PC12
|
||||
#define EXP1_08_PIN PB6
|
||||
#define EXP1_09_PIN PC11
|
||||
#define EXP1_10_PIN PC10
|
||||
|
||||
#define EXP2_03_PIN -1 // RESET
|
||||
#define EXP2_04_PIN PB9
|
||||
#define EXP2_05_PIN PB5
|
||||
#define EXP2_06_PIN PB8
|
||||
#define EXP2_07_PIN PA15
|
||||
#define EXP2_08_PIN PD2
|
||||
#define EXP2_09_PIN PB3
|
||||
#define EXP2_10_PIN PB4
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if HAS_WIRED_LCD
|
||||
#define BEEPER_PIN PC10
|
||||
#define BTN_ENC PC11
|
||||
#define BEEPER_PIN EXP1_10_PIN
|
||||
#define BTN_ENC EXP1_09_PIN
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY)
|
||||
#define LCD_PINS_RS PC15
|
||||
#define LCD_PINS_RS EXP1_04_PIN
|
||||
|
||||
#define BTN_EN1 PB6
|
||||
#define BTN_EN2 PC13
|
||||
#define BTN_EN1 EXP1_08_PIN
|
||||
#define BTN_EN2 EXP1_06_PIN
|
||||
|
||||
#define LCD_PINS_ENABLE PC14
|
||||
#define LCD_PINS_D4 PB7
|
||||
#define LCD_PINS_ENABLE EXP1_03_PIN
|
||||
#define LCD_PINS_D4 EXP1_05_PIN
|
||||
|
||||
#elif IS_TFTGLCD_PANEL
|
||||
|
||||
@ -127,56 +142,56 @@
|
||||
#undef BTN_ENC
|
||||
|
||||
#if ENABLED(TFTGLCD_PANEL_SPI)
|
||||
#define TFTGLCD_CS PD2
|
||||
#define TFTGLCD_CS EXP2_08_PIN
|
||||
#endif
|
||||
|
||||
#define SD_DETECT_PIN PB9
|
||||
#define SD_DETECT_PIN EXP2_04_PIN
|
||||
|
||||
#else
|
||||
|
||||
#define LCD_PINS_RS PC12
|
||||
#define LCD_PINS_RS EXP1_07_PIN
|
||||
|
||||
#define BTN_EN1 PD2
|
||||
#define BTN_EN2 PB8
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
#define LCD_PINS_ENABLE PB6
|
||||
#define LCD_PINS_ENABLE EXP1_08_PIN
|
||||
|
||||
#if ENABLED(FYSETC_MINI_12864)
|
||||
|
||||
#define LCD_BACKLIGHT_PIN -1
|
||||
#define LCD_RESET_PIN PC13
|
||||
#define DOGLCD_A0 PC12
|
||||
#define DOGLCD_CS PB6
|
||||
#define DOGLCD_SCK PB3
|
||||
#define DOGLCD_MOSI PB5
|
||||
#define LCD_RESET_PIN EXP1_06_PIN
|
||||
#define DOGLCD_A0 EXP1_07_PIN
|
||||
#define DOGLCD_CS EXP1_08_PIN
|
||||
#define DOGLCD_SCK EXP2_09_PIN
|
||||
#define DOGLCD_MOSI EXP2_05_PIN
|
||||
|
||||
#define FORCE_SOFT_SPI // SPI MODE3
|
||||
|
||||
#define LED_PIN PB7 // red pwm
|
||||
//#define LED_PIN PC15 // green
|
||||
//#define LED_PIN PC14 // blue
|
||||
#define LED_PIN EXP1_05_PIN // red pwm
|
||||
//#define LED_PIN EXP1_04_PIN // green
|
||||
//#define LED_PIN EXP1_03_PIN // blue
|
||||
|
||||
//#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
|
||||
// #ifndef RGB_LED_R_PIN
|
||||
// #define RGB_LED_R_PIN PB7
|
||||
// #define RGB_LED_R_PIN EXP1_05_PIN
|
||||
// #endif
|
||||
// #ifndef RGB_LED_G_PIN
|
||||
// #define RGB_LED_G_PIN PC15
|
||||
// #define RGB_LED_G_PIN EXP1_04_PIN
|
||||
// #endif
|
||||
// #ifndef RGB_LED_B_PIN
|
||||
// #define RGB_LED_B_PIN PC14
|
||||
// #define RGB_LED_B_PIN EXP1_03_PIN
|
||||
// #endif
|
||||
//#elif ENABLED(FYSETC_MINI_12864_2_1)
|
||||
// #define NEOPIXEL_PIN PB7
|
||||
// #define NEOPIXEL_PIN EXP1_05_PIN
|
||||
//#endif
|
||||
|
||||
#else // !FYSETC_MINI_12864
|
||||
|
||||
#define LCD_PINS_D4 PC13
|
||||
#define LCD_PINS_D4 EXP1_06_PIN
|
||||
#if IS_ULTIPANEL
|
||||
#define LCD_PINS_D5 PB7
|
||||
#define LCD_PINS_D6 PC15
|
||||
#define LCD_PINS_D7 PC14
|
||||
#define LCD_PINS_D5 EXP1_05_PIN
|
||||
#define LCD_PINS_D6 EXP1_04_PIN
|
||||
#define LCD_PINS_D7 EXP1_03_PIN
|
||||
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
||||
@ -186,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
|
||||
@ -214,11 +224,11 @@
|
||||
|
||||
#if SD_CONNECTION_IS(LCD)
|
||||
#define SPI_DEVICE 3
|
||||
#define SD_DETECT_PIN PB9
|
||||
#define SD_SCK_PIN PB3
|
||||
#define SD_MISO_PIN PB4
|
||||
#define SD_MOSI_PIN PB5
|
||||
#define SD_SS_PIN PA15
|
||||
#define SD_DETECT_PIN EXP2_04_PIN
|
||||
#define SD_SCK_PIN EXP2_09_PIN
|
||||
#define SD_MISO_PIN EXP2_10_PIN
|
||||
#define SD_MOSI_PIN EXP2_05_PIN
|
||||
#define SD_SS_PIN EXP2_07_PIN
|
||||
#elif SD_CONNECTION_IS(ONBOARD)
|
||||
#define SD_DETECT_PIN PA3
|
||||
#define SD_SCK_PIN PA5
|
||||
|
@ -122,41 +122,43 @@
|
||||
#define NEOPIXEL_PIN PC7 // The NEOPIXEL LED driving pin
|
||||
|
||||
/**
|
||||
* 1 ----- 2
|
||||
* PB5 | · · | PB6
|
||||
* PA2 | · · | RESET
|
||||
* PA3 | · · | PB8
|
||||
* PB7 | · · | PA4
|
||||
* GND | · · | VCC5
|
||||
* 9 ----- 10
|
||||
* LCD EXP
|
||||
* ------
|
||||
* PB5 |10 9 | PB6
|
||||
* PA2 | 8 7 | RESET
|
||||
* PA3 6 5 | PB8
|
||||
* PB7 | 4 3 | PA4
|
||||
* GND | 2 1 | VCC5
|
||||
* ------
|
||||
* EXP1
|
||||
*/
|
||||
#define EXP1_03_PIN PA4
|
||||
#define EXP1_04_PIN PB7
|
||||
#define EXP1_05_PIN PB8
|
||||
#define EXP1_06_PIN PA3
|
||||
#define EXP1_07_PIN -1 // RESET
|
||||
#define EXP1_08_PIN PA2
|
||||
#define EXP1_09_PIN PB6
|
||||
#define EXP1_10_PIN PB5
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if ENABLED(CR10_STOCKDISPLAY)
|
||||
#define BEEPER_PIN PB5
|
||||
#define BTN_EN1 PA2
|
||||
#define BTN_EN2 PA3
|
||||
#define BTN_ENC PB6
|
||||
#define BEEPER_PIN EXP1_10_PIN
|
||||
#define BTN_EN1 EXP1_08_PIN
|
||||
#define BTN_EN2 EXP1_06_PIN
|
||||
#define BTN_ENC EXP1_09_PIN
|
||||
|
||||
#define LCD_PINS_RS PB7 // CS -- SOFT SPI for ENDER3 LCD
|
||||
#define LCD_PINS_D4 PB8 // SCLK
|
||||
#define LCD_PINS_ENABLE PA4 // DATA MOSI
|
||||
#define LCD_PINS_RS EXP1_04_PIN // CS -- SOFT SPI for ENDER3 LCD
|
||||
#define LCD_PINS_D4 EXP1_05_PIN // SCLK
|
||||
#define LCD_PINS_ENABLE EXP1_03_PIN // DATA MOSI
|
||||
#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
|
||||
|
||||
//
|
||||
|
@ -83,13 +83,13 @@
|
||||
|
||||
#if ENABLED(TMC_USE_SW_SPI)
|
||||
#ifndef TMC_SW_MOSI
|
||||
#define TMC_SW_MOSI PB15
|
||||
#define TMC_SW_MOSI EXP2_05_PIN
|
||||
#endif
|
||||
#ifndef TMC_SW_MISO
|
||||
#define TMC_SW_MISO PB14
|
||||
#define TMC_SW_MISO EXP2_10_PIN
|
||||
#endif
|
||||
#ifndef TMC_SW_SCK
|
||||
#define TMC_SW_SCK PB13
|
||||
#define TMC_SW_SCK EXP2_09_PIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -120,52 +120,69 @@
|
||||
#define TEMP_BED_PIN PC0 // Analog Input
|
||||
#define TEMP_0_PIN PC1 // Analog Input
|
||||
|
||||
//
|
||||
// LCD Pins
|
||||
//
|
||||
/** ------ ------
|
||||
* (BEEPER) PC14 |10 9 | PC13 (BTN_ENC) (MISO) PB14 |10 9 | PB13 (SD_SCK)
|
||||
* (LCD_EN) PB9 | 8 7 | PB8 (LCD_RS) (BTN_EN1) PB3 | 8 7 | PB12 (SD_CS2)
|
||||
* (LCD_D4) PB7 | 6 5 PB6 (LCD_D5) (BTN_EN2) PD2 | 6 5 PB15 (SD_MOSI)
|
||||
* (LCD_D6) PB5 | 4 3 | PB4 (LCD_D7) (SD_DETECT) PB11 | 4 3 | RESET
|
||||
* GND | 2 1 | 5V GND | 2 1 | NC
|
||||
* ------ ------
|
||||
* EXP1 EXP2
|
||||
*/
|
||||
#define EXP1_03_PIN PB4
|
||||
#define EXP1_04_PIN PB5
|
||||
#define EXP1_05_PIN PB6
|
||||
#define EXP1_06_PIN PB7
|
||||
#define EXP1_07_PIN PB8
|
||||
#define EXP1_08_PIN PB9
|
||||
#define EXP1_09_PIN PC13
|
||||
#define EXP1_10_PIN PC14
|
||||
|
||||
#define EXP2_03_PIN -1 // RESET
|
||||
#define EXP2_04_PIN PB11
|
||||
#define EXP2_05_PIN PB15
|
||||
#define EXP2_06_PIN PD2
|
||||
#define EXP2_07_PIN PB12
|
||||
#define EXP2_08_PIN PB3
|
||||
#define EXP2_09_PIN PB13
|
||||
#define EXP2_10_PIN PB14
|
||||
|
||||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#define SPI_DEVICE 2
|
||||
#define SD_SS_PIN PB12
|
||||
#define SD_SCK_PIN PB13
|
||||
#define SD_MISO_PIN PB14
|
||||
#define SD_MOSI_PIN PB15
|
||||
#if HAS_WIRED_LCD
|
||||
|
||||
#define SDSS SD_SS_PIN
|
||||
#define SD_DETECT_PIN PB11
|
||||
#define SPI_DEVICE 2
|
||||
#define SD_SS_PIN EXP2_07_PIN
|
||||
#define SD_SCK_PIN EXP2_09_PIN
|
||||
#define SD_MISO_PIN EXP2_10_PIN
|
||||
#define SD_MOSI_PIN EXP2_05_PIN
|
||||
|
||||
#define BEEPER_PIN PC14
|
||||
#define SDSS SD_SS_PIN
|
||||
#define SD_DETECT_PIN EXP2_04_PIN
|
||||
|
||||
#define LCD_PINS_RS PB8
|
||||
#define LCD_PINS_ENABLE PB9
|
||||
#define LCD_PINS_D4 PB7
|
||||
#define LCD_PINS_D5 PB6
|
||||
#define LCD_PINS_D6 PB5
|
||||
#define LCD_PINS_D7 PB4
|
||||
#define BEEPER_PIN EXP1_10_PIN
|
||||
|
||||
#define BTN_EN1 PD2
|
||||
#define BTN_EN2 PB3
|
||||
#define BTN_ENC PC13
|
||||
#define LCD_PINS_RS EXP1_07_PIN
|
||||
#define LCD_PINS_ENABLE EXP1_08_PIN
|
||||
#define LCD_PINS_D4 EXP1_06_PIN
|
||||
#define LCD_PINS_D5 EXP1_05_PIN
|
||||
#define LCD_PINS_D6 EXP1_04_PIN
|
||||
#define LCD_PINS_D7 EXP1_03_PIN
|
||||
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
||||
#endif
|
||||
#define BTN_EN1 EXP2_06_PIN
|
||||
#define BTN_EN2 EXP2_08_PIN
|
||||
#define BTN_ENC EXP1_09_PIN
|
||||
|
||||
//
|
||||
// Filament runout
|
||||
//
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
||||
#endif
|
||||
|
||||
//
|
||||
// ST7920 Delays
|
||||
//
|
||||
#ifndef ST7920_DELAY_1
|
||||
#define ST7920_DELAY_1 DELAY_NS(96)
|
||||
#endif
|
||||
#ifndef ST7920_DELAY_2
|
||||
#define ST7920_DELAY_2 DELAY_NS(48)
|
||||
#endif
|
||||
#ifndef ST7920_DELAY_3
|
||||
#define ST7920_DELAY_3 DELAY_NS(715)
|
||||
#endif
|
||||
// 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)
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
@ -157,16 +157,11 @@
|
||||
//#define LCD_UART_RX PD9
|
||||
#endif
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
|
||||
#endif
|
||||
// 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)
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
@ -165,16 +165,11 @@
|
||||
//#define LCD_UART_RX PD9
|
||||
#endif
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
|
||||
#endif
|
||||
// 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)
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
@ -162,16 +162,11 @@
|
||||
//#define LCD_UART_RX PD9
|
||||
#endif
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
|
||||
#endif
|
||||
// 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)
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
@ -167,16 +167,11 @@
|
||||
//#define LCD_UART_RX PD9
|
||||
#endif
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
|
||||
#endif
|
||||
// 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)
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
@ -342,15 +342,9 @@
|
||||
|
||||
#endif
|
||||
|
||||
#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
|
||||
#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 // !MKS_MINI_12864
|
||||
|
||||
|
@ -133,52 +133,82 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ----- ----- -----
|
||||
* (BEEPER) PC1 | 1 2 | PC3 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SD_SCK) 5V | 1 2 | GND
|
||||
* (LCD_EN) PA4 | 3 4 | PA5 (LCD_RS) (BTN_EN1) PB11 | 3 4 | PA15 (SD_SS) (LCD_EN) PA4 | 3 4 | PA5 (LCD_RS)
|
||||
* (LCD_D4) PA6 | 5 6 PA7 (LCD_D5) (BTN_EN2) PB0 | 5 6 PB15 (SD_MOSI) (LCD_D4) PA6 | 5 6 PB0 (BTN_EN2)
|
||||
* (LCD_D6) PC4 | 7 8 | PC5 (LCD_D7) (SD_DETECT) PC10 | 7 8 | RESET RESET | 7 8 | PB11 (BTN_EN1)
|
||||
* GND | 9 10| 5V GND | 9 10| NC (BTN_ENC) PC3 | 9 10| PC1 (BEEPER)
|
||||
* ----- ----- -----
|
||||
* EXP1 EXP2 EXP3
|
||||
* ------ ------ ------
|
||||
* (BEEPER) PC1 |10 9 | PC3 (BTN_ENC) (MISO) PB14 |10 9 | PB13 (SD_SCK) (BEEPER) PC1 |10 9 | PC3 (BTN_ENC)
|
||||
* (LCD_EN) PA4 | 8 7 | PA5 (LCD_RS) (BTN_EN1) PB11 | 8 7 | PA15 (SD_SS) (BTN_EN1) PB11 | 8 7 | RESET
|
||||
* (LCD_D4) PA6 6 5 | PA7 (LCD_D5) (BTN_EN2) PB0 6 5 | PB15 (SD_MOSI) (BTN_EN2) PB0 6 5 | PA6 (LCD_D4)
|
||||
* (LCD_D6) PC4 | 4 3 | PC5 (LCD_D7) (SD_DETECT) PC10 | 4 3 | RESET (LCD_RS) PA5 | 4 3 | PA4 (LCD_EN)
|
||||
* GND | 2 1 | 5V GND | 2 1 | NC GND | 2 1 | 5V
|
||||
* ------ ------ ------
|
||||
* EXP1 EXP2 "Ender-3 EXP1"
|
||||
*/
|
||||
#define EXP1_03_PIN PC5
|
||||
#define EXP1_04_PIN PC4
|
||||
#define EXP1_05_PIN PA7
|
||||
#define EXP1_06_PIN PA6
|
||||
#define EXP1_07_PIN PA5
|
||||
#define EXP1_08_PIN PA4
|
||||
#define EXP1_09_PIN PC3
|
||||
#define EXP1_10_PIN PC1
|
||||
|
||||
#define EXP2_03_PIN -1 // RESET
|
||||
#define EXP2_04_PIN PC10
|
||||
#define EXP2_05_PIN PB15
|
||||
#define EXP2_06_PIN PB0
|
||||
#define EXP2_07_PIN PA15
|
||||
#define EXP2_08_PIN PB11
|
||||
#define EXP2_09_PIN PB13
|
||||
#define EXP2_10_PIN PB14
|
||||
|
||||
// "Ender-3 EXP1"
|
||||
#define E3_EXP1_03_PIN PA4
|
||||
#define E3_EXP1_04_PIN PA5
|
||||
#define E3_EXP1_05_PIN PA6
|
||||
#define E3_EXP1_06_PIN PB0
|
||||
#define E3_EXP1_07_PIN -1 // RESET
|
||||
#define E3_EXP1_08_PIN PB11
|
||||
#define E3_EXP1_09_PIN PC3
|
||||
#define E3_EXP1_10_PIN PC1
|
||||
|
||||
#if HAS_WIRED_LCD
|
||||
|
||||
#define BEEPER_PIN PC1
|
||||
#define BTN_ENC PC3
|
||||
#define LCD_PINS_ENABLE PA4
|
||||
#define LCD_PINS_RS PA5
|
||||
#define BTN_EN1 PB11
|
||||
#define BTN_EN2 PB0
|
||||
#define BEEPER_PIN EXP1_10_PIN
|
||||
#define BTN_ENC EXP1_09_PIN
|
||||
#define LCD_PINS_ENABLE EXP1_08_PIN
|
||||
#define LCD_PINS_RS EXP1_07_PIN
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
// MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor)
|
||||
#if ENABLED(MKS_MINI_12864)
|
||||
|
||||
#define LCD_BACKLIGHT_PIN -1
|
||||
#define LCD_RESET_PIN -1
|
||||
#define DOGLCD_A0 PC4
|
||||
#define DOGLCD_CS PA7
|
||||
#define DOGLCD_SCK PB13
|
||||
#define DOGLCD_MOSI PB15
|
||||
#define DOGLCD_A0 EXP1_04_PIN
|
||||
#define DOGLCD_CS EXP1_05_PIN
|
||||
#define DOGLCD_SCK EXP2_09_PIN
|
||||
#define DOGLCD_MOSI EXP2_05_PIN
|
||||
|
||||
#elif ENABLED(MKS_MINI_12864_V3)
|
||||
#define ENABLE_SPI3
|
||||
#define DOGLCD_CS PA4
|
||||
#define DOGLCD_A0 PA5
|
||||
#define DOGLCD_CS EXP1_08_PIN
|
||||
#define DOGLCD_A0 EXP1_07_PIN
|
||||
#define LCD_PINS_DC DOGLCD_A0
|
||||
#define LCD_BACKLIGHT_PIN -1
|
||||
#define LCD_RESET_PIN PA6
|
||||
#define NEOPIXEL_PIN PA7
|
||||
#define DOGLCD_MOSI PB15
|
||||
#define DOGLCD_SCK PB13
|
||||
#define LCD_RESET_PIN EXP1_06_PIN
|
||||
#define NEOPIXEL_PIN EXP1_05_PIN
|
||||
#define DOGLCD_MOSI EXP2_05_PIN
|
||||
#define DOGLCD_SCK EXP2_09_PIN
|
||||
#define FORCE_SOFT_SPI
|
||||
#define SOFTWARE_SPI
|
||||
//#define LCD_SCREEN_ROT_180
|
||||
|
||||
#else
|
||||
|
||||
#define LCD_PINS_D4 PA6
|
||||
#define LCD_PINS_D4 EXP1_06_PIN
|
||||
#if IS_ULTIPANEL
|
||||
#define LCD_PINS_D5 PA7
|
||||
#define LCD_PINS_D6 PC4
|
||||
#define LCD_PINS_D7 PC5
|
||||
#define LCD_PINS_D5 EXP1_05_PIN
|
||||
#define LCD_PINS_D6 EXP1_04_PIN
|
||||
#define LCD_PINS_D7 EXP1_03_PIN
|
||||
|
||||
#if !defined(BTN_ENC_EN) && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
||||
@ -190,30 +220,33 @@
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#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
|
||||
|
||||
//
|
||||
// SD Card
|
||||
//
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#define SPI_DEVICE 2
|
||||
#define ONBOARD_SPI_DEVICE 2
|
||||
#define SDSS SD_SS_PIN
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#define SD_DETECT_PIN PC10
|
||||
#define ONBOARD_SD_CS_PIN SD_SS_PIN
|
||||
#define SD_DETECT_PIN PC10 // EXP2_04_PIN
|
||||
#define NO_SD_HOST_DRIVE
|
||||
|
||||
// TODO: This is the only way to set SPI for SD on STM32 (for now)
|
||||
#define ENABLE_SPI2
|
||||
#define SD_SCK_PIN PB13
|
||||
#define SD_MISO_PIN PB14
|
||||
#define SD_MOSI_PIN PB15
|
||||
#define SD_SS_PIN PA15
|
||||
|
||||
#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
|
||||
#define SD_SCK_PIN EXP2_09_PIN
|
||||
#define SD_MISO_PIN EXP2_10_PIN
|
||||
#define SD_MOSI_PIN EXP2_05_PIN
|
||||
#define SD_SS_PIN EXP2_07_PIN
|
||||
|
@ -112,16 +112,11 @@
|
||||
|
||||
#endif // !MKS_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 // HAS_WIRED_LCD
|
||||
|
@ -378,13 +378,9 @@
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#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
|
||||
|
||||
|
@ -299,16 +299,11 @@
|
||||
|
||||
#endif
|
||||
|
||||
#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
|
||||
|
||||
#define HAS_SPI_FLASH 1
|
||||
|
@ -331,7 +331,8 @@
|
||||
#define ADC_KEYPAD_PIN PC0 // PIN6 of AUX1
|
||||
#endif
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
// 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)
|
||||
|
@ -304,7 +304,8 @@
|
||||
#define BTN_ENC EXP2_05_PIN // PE15
|
||||
#endif
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
// 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
|
||||
|
Reference in New Issue
Block a user