|
|
@ -215,8 +215,8 @@ |
|
|
|
// Onboard SD card
|
|
|
|
// NOT compatible with LCD
|
|
|
|
//
|
|
|
|
// detect pin doesn't work when ONBOARD and NO_SD_HOST_DRIVE disabled
|
|
|
|
#if !defined(SDCARD_CONNECTION) || SDCARD_CONNECTION == ONBOARD |
|
|
|
// Detect pin doesn't work when ONBOARD and NO_SD_HOST_DRIVE disabled
|
|
|
|
#if SD_CONNECTION_IS(ONBOARD) |
|
|
|
#if USE_NEW_SPI_API |
|
|
|
#define SD_SPI MARLIN_SPI(HardwareSPI3, PC9) |
|
|
|
#else |
|
|
@ -230,17 +230,44 @@ |
|
|
|
#define SD_DETECT_PIN PD12 |
|
|
|
#endif |
|
|
|
|
|
|
|
/*
|
|
|
|
/** ------ ------
|
|
|
|
* (BEEPER) PC5 |10 9 | PE13 (BTN_ENC) (SPI1 MISO) PA6 |10 9 | PA5 (SPI1 SCK) |
|
|
|
* (LCD_EN) PD13 | 8 7 | PC6 (LCD_RS) (BTN_EN1) PE8 | 8 7 | PE10 (SPI1 CS) |
|
|
|
* (LCD_D4) PE14 6 5 | PE15 (LCD_D5) (BTN_EN2) PE11 6 5 | PA7 (SPI1 MOSI) |
|
|
|
* (LCD_D6) PD11 | 4 3 | PD10 (LCD_D7) (SPI DET) PE12 | 4 3 | RESET |
|
|
|
* GND | 2 1 | 5V GND | 2 1 | 3.3V |
|
|
|
* ------ ------ |
|
|
|
* EXP1 EXP2 |
|
|
|
*/ |
|
|
|
#define EXP1_03_PIN PD10 |
|
|
|
#define EXP1_04_PIN PD11 |
|
|
|
#define EXP1_05_PIN PE15 |
|
|
|
#define EXP1_06_PIN PE14 |
|
|
|
#define EXP1_07_PIN PC6 |
|
|
|
#define EXP1_08_PIN PD13 |
|
|
|
#define EXP1_09_PIN PE13 |
|
|
|
#define EXP1_10_PIN PC5 |
|
|
|
|
|
|
|
#define EXP2_03_PIN -1 // RESET
|
|
|
|
#define EXP2_04_PIN PE12 |
|
|
|
#define EXP2_05_PIN PA7 |
|
|
|
#define EXP2_06_PIN PE11 |
|
|
|
#define EXP2_07_PIN PE10 |
|
|
|
#define EXP2_08_PIN PE8 |
|
|
|
#define EXP2_09_PIN PA5 |
|
|
|
#define EXP2_10_PIN PA6 |
|
|
|
|
|
|
|
//
|
|
|
|
// LCD SD
|
|
|
|
//
|
|
|
|
#if SDCARD_CONNECTION == LCD |
|
|
|
/*
|
|
|
|
#if SD_CONNECTION_IS(LCD) |
|
|
|
#define ENABLE_SPI1 |
|
|
|
#define SDSS PE10 |
|
|
|
#define SD_SCK_PIN PA5 |
|
|
|
#define SD_MISO_PIN PA6 |
|
|
|
#define SD_MOSI_PIN PA7 |
|
|
|
#define SD_DETECT_PIN PE12 |
|
|
|
#define SDSS 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 SD_DETECT_PIN EXP2_04_PIN |
|
|
|
#endif |
|
|
|
*/ |
|
|
|
|
|
|
@ -257,17 +284,6 @@ |
|
|
|
#define SPI_FLASH_SCK_PIN PB13 |
|
|
|
#endif |
|
|
|
|
|
|
|
/**
|
|
|
|
* ----- ----- |
|
|
|
* (BEEPER)PC5 | · · | PE13(BTN_ENC) (SPI1 MISO) PA6 | · · | PA5 (SPI1 SCK) |
|
|
|
* (LCD_EN)PD13 | · · | PC6(LCD_RS) (BTN_EN1) PE8 | · · | PE10 (SPI1 CS) |
|
|
|
* (LCD_D4)PE14 | · · | PE15(LCD_D5) (BTN_EN2) PE11 | · · | PA7 (SPI1 MOSI) |
|
|
|
* (LCD_D6)PD11 | · · | PD10(LCD_D7) (SPI DET) PE12 | · · | RESET |
|
|
|
* GND | · · | 5V GND | · · | 3.3V |
|
|
|
* ----- ----- |
|
|
|
* EXP1 EXP2 |
|
|
|
*/ |
|
|
|
|
|
|
|
#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) |
|
|
|
#ifndef TOUCH_CALIBRATION_X |
|
|
|
#define TOUCH_CALIBRATION_X -17253 |
|
|
@ -285,21 +301,21 @@ |
|
|
|
#define TOUCH_ORIENTATION TOUCH_LANDSCAPE |
|
|
|
#endif |
|
|
|
|
|
|
|
#define TFT_CS_PIN PD11 |
|
|
|
#define TFT_SCK_PIN PA5 |
|
|
|
#define TFT_MISO_PIN PA6 |
|
|
|
#define TFT_MOSI_PIN PA7 |
|
|
|
#define TFT_DC_PIN PD10 |
|
|
|
#define TFT_RST_PIN PC6 |
|
|
|
#define TFT_CS_PIN EXP1_04_PIN |
|
|
|
#define TFT_SCK_PIN EXP2_09_PIN |
|
|
|
#define TFT_MISO_PIN EXP2_10_PIN |
|
|
|
#define TFT_MOSI_PIN EXP2_05_PIN |
|
|
|
#define TFT_DC_PIN EXP1_03_PIN |
|
|
|
#define TFT_RST_PIN EXP1_07_PIN |
|
|
|
#define TFT_A0_PIN TFT_DC_PIN |
|
|
|
|
|
|
|
#define TFT_RESET_PIN PC6 |
|
|
|
#define TFT_BACKLIGHT_PIN PD13 |
|
|
|
#define TFT_RESET_PIN EXP1_07_PIN |
|
|
|
#define TFT_BACKLIGHT_PIN EXP1_08_PIN |
|
|
|
|
|
|
|
#define TOUCH_BUTTONS_HW_SPI |
|
|
|
#define TOUCH_BUTTONS_HW_SPI_DEVICE 1 |
|
|
|
|
|
|
|
#define LCD_BACKLIGHT_PIN PD13 |
|
|
|
#define LCD_BACKLIGHT_PIN EXP1_08_PIN |
|
|
|
#ifndef TFT_WIDTH |
|
|
|
#define TFT_WIDTH 480 |
|
|
|
#endif |
|
|
@ -307,15 +323,15 @@ |
|
|
|
#define TFT_HEIGHT 320 |
|
|
|
#endif |
|
|
|
|
|
|
|
#define TOUCH_CS_PIN PE14 // SPI1_NSS
|
|
|
|
#define TOUCH_SCK_PIN PA5 // SPI1_SCK
|
|
|
|
#define TOUCH_MISO_PIN PA6 // SPI1_MISO
|
|
|
|
#define TOUCH_MOSI_PIN PA7 // SPI1_MOSI
|
|
|
|
#define TOUCH_CS_PIN EXP1_06_PIN // SPI1_NSS
|
|
|
|
#define TOUCH_SCK_PIN EXP2_09_PIN // SPI1_SCK
|
|
|
|
#define TOUCH_MISO_PIN EXP2_10_PIN // SPI1_MISO
|
|
|
|
#define TOUCH_MOSI_PIN EXP2_05_PIN // SPI1_MOSI
|
|
|
|
|
|
|
|
#define BTN_EN1 PE8 |
|
|
|
#define BTN_EN2 PE11 |
|
|
|
#define BEEPER_PIN PC5 |
|
|
|
#define BTN_ENC PE13 |
|
|
|
#define BTN_EN1 EXP2_08_PIN |
|
|
|
#define BTN_EN2 EXP2_06_PIN |
|
|
|
#define BEEPER_PIN EXP1_10_PIN |
|
|
|
#define BTN_ENC EXP1_09_PIN |
|
|
|
|
|
|
|
#define LCD_READ_ID 0xD3 |
|
|
|
#define LCD_USE_DMA_SPI |
|
|
@ -325,22 +341,22 @@ |
|
|
|
|
|
|
|
#elif HAS_WIRED_LCD |
|
|
|
|
|
|
|
#define BEEPER_PIN PC5 |
|
|
|
#define BTN_ENC PE13 |
|
|
|
#define LCD_PINS_ENABLE PD13 |
|
|
|
#define LCD_PINS_RS PC6 |
|
|
|
#define BTN_EN1 PE8 |
|
|
|
#define BTN_EN2 PE11 |
|
|
|
#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 |
|
|
|
#define LCD_BACKLIGHT_PIN -1 |
|
|
|
|
|
|
|
// 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 PD11 |
|
|
|
#define DOGLCD_CS PE15 |
|
|
|
//#define DOGLCD_SCK PA5
|
|
|
|
//#define DOGLCD_MOSI PA7
|
|
|
|
#define DOGLCD_A0 EXP1_04_PIN |
|
|
|
#define DOGLCD_CS EXP1_05_PIN |
|
|
|
//#define DOGLCD_SCK EXP2_09_PIN
|
|
|
|
//#define DOGLCD_MOSI EXP2_05_PIN
|
|
|
|
|
|
|
|
// Required for MKS_MINI_12864 with this board
|
|
|
|
//#define MKS_LCD12864B
|
|
|
@ -348,15 +364,15 @@ |
|
|
|
|
|
|
|
#else // !MKS_MINI_12864
|
|
|
|
|
|
|
|
#define LCD_PINS_D4 PE14 |
|
|
|
#define LCD_PINS_D4 EXP1_06_PIN |
|
|
|
#if ENABLED(ULTIPANEL) |
|
|
|
#define LCD_PINS_D5 PE15 |
|
|
|
#define LCD_PINS_D6 PD11 |
|
|
|
#define LCD_PINS_D7 PD10 |
|
|
|
#define LCD_PINS_D5 EXP1_05_PIN |
|
|
|
#define LCD_PINS_D6 EXP1_04_PIN |
|
|
|
#define LCD_PINS_D7 EXP1_03_PIN |
|
|
|
#endif |
|
|
|
|
|
|
|
#define BOARD_ST7920_DELAY_1 DELAY_NS(96) |
|
|
|
#define BOARD_ST7920_DELAY_2 DELAY_NS(48) |
|
|
|
#define BOARD_ST7920_DELAY_1 DELAY_NS( 96) |
|
|
|
#define BOARD_ST7920_DELAY_2 DELAY_NS( 48) |
|
|
|
#define BOARD_ST7920_DELAY_3 DELAY_NS(600) |
|
|
|
|
|
|
|
#endif // !MKS_MINI_12864
|
|
|
|