📺 MKS MINI12864 V3 for Robin E3P, etc. (#22453)
This commit is contained in:
parent
fbb5732dee
commit
381c5908b4
@ -38,6 +38,9 @@
|
|||||||
#define BOARD_NO_NATIVE_USB
|
#define BOARD_NO_NATIVE_USB
|
||||||
#define MKS_HARDWARE_TEST_ONLY_E0
|
#define MKS_HARDWARE_TEST_ONLY_E0
|
||||||
|
|
||||||
|
// Avoid conflict with TIMER_SERVO when using the STM32 HAL
|
||||||
|
#define TEMP_TIMER 5
|
||||||
|
|
||||||
//
|
//
|
||||||
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
|
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
|
||||||
//
|
//
|
||||||
@ -214,17 +217,23 @@
|
|||||||
#define SDCARD_CONNECTION ONBOARD
|
#define SDCARD_CONNECTION ONBOARD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SDIO_SUPPORT
|
#if SD_CONNECTION_IS(ONBOARD)
|
||||||
#define SDIO_CLOCK 4500000 // 4.5 MHz
|
#define SDIO_SUPPORT
|
||||||
#define SD_DETECT_PIN PD12
|
#define SDIO_CLOCK 4500000 // 4.5 MHz
|
||||||
#define ONBOARD_SD_CS_PIN PC11
|
#define SD_DETECT_PIN PD12
|
||||||
|
#define ONBOARD_SD_CS_PIN PC11
|
||||||
|
#elif 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
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// LCD / Controller
|
// LCD / Controller
|
||||||
//
|
//
|
||||||
#ifndef BEEPER_PIN
|
|
||||||
#define BEEPER_PIN PC5
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Note: MKS Robin TFT screens use various TFT controllers.
|
* Note: MKS Robin TFT screens use various TFT controllers.
|
||||||
@ -261,33 +270,29 @@
|
|||||||
#define TOUCH_BUTTONS_HW_SPI
|
#define TOUCH_BUTTONS_HW_SPI
|
||||||
#define TOUCH_BUTTONS_HW_SPI_DEVICE 1
|
#define TOUCH_BUTTONS_HW_SPI_DEVICE 1
|
||||||
|
|
||||||
#ifndef TFT_WIDTH
|
|
||||||
#define TFT_WIDTH 480
|
|
||||||
#endif
|
|
||||||
#ifndef TFT_HEIGHT
|
|
||||||
#define TFT_HEIGHT 320
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define LCD_READ_ID 0xD3
|
|
||||||
#define LCD_USE_DMA_SPI
|
#define LCD_USE_DMA_SPI
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_SPI_GRAPHICAL_TFT
|
#if ENABLED(TFT_CLASSIC_UI)
|
||||||
// Emulated DOGM SPI
|
// Emulated DOGM SPI
|
||||||
#define LCD_PINS_ENABLE PD13
|
#define LCD_PINS_ENABLE PD13
|
||||||
#define LCD_PINS_RS PC6
|
#define LCD_PINS_RS PC6
|
||||||
#define BTN_ENC PE13
|
#define BTN_ENC PE13
|
||||||
#define BTN_EN1 PE8
|
#define BTN_EN1 PE8
|
||||||
#define BTN_EN2 PE11
|
#define BTN_EN2 PE11
|
||||||
#elif ENABLED(TFT_480x320_SPI)
|
#elif ENABLED(TFT_COLOR_UI)
|
||||||
#define TFT_DRIVER ST7796
|
|
||||||
#define TFT_BUFFER_SIZE 14400
|
#define TFT_BUFFER_SIZE 14400
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_WIRED_LCD && !HAS_SPI_TFT
|
#if HAS_WIRED_LCD && !HAS_SPI_TFT
|
||||||
|
#define BEEPER_PIN PC5
|
||||||
// NON TFT Displays
|
#define BTN_ENC PE13
|
||||||
|
#define LCD_PINS_ENABLE PD13
|
||||||
|
#define LCD_PINS_RS PC6
|
||||||
|
#define BTN_EN1 PE8
|
||||||
|
#define BTN_EN2 PE11
|
||||||
|
#define LCD_BACKLIGHT_PIN -1
|
||||||
|
|
||||||
#if ENABLED(MKS_MINI_12864)
|
#if ENABLED(MKS_MINI_12864)
|
||||||
|
|
||||||
@ -301,9 +306,32 @@
|
|||||||
#define DOGLCD_SCK PA5
|
#define DOGLCD_SCK PA5
|
||||||
#define DOGLCD_MOSI PA7
|
#define DOGLCD_MOSI PA7
|
||||||
|
|
||||||
// Required for MKS_MINI_12864 with this board
|
#elif IS_TFTGLCD_PANEL
|
||||||
#define MKS_LCD12864B
|
|
||||||
#undef SHOW_BOOTSCREEN
|
#if ENABLED(TFTGLCD_PANEL_SPI)
|
||||||
|
#define PIN_SPI_SCK PA5
|
||||||
|
#define PIN_TFT_MISO PA6
|
||||||
|
#define PIN_TFT_MOSI PA7
|
||||||
|
#define TFTGLCD_CS PE8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef BEEPER_PIN
|
||||||
|
#define BEEPER_PIN -1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#elif ENABLED(MKS_MINI_12864_V3)
|
||||||
|
#define DOGLCD_CS PD13
|
||||||
|
#define DOGLCD_A0 PC6
|
||||||
|
#define LCD_PINS_DC DOGLCD_A0
|
||||||
|
#define LCD_BACKLIGHT_PIN -1
|
||||||
|
#define LCD_RESET_PIN PE14
|
||||||
|
#define NEOPIXEL_PIN PE15
|
||||||
|
#define DOGLCD_MOSI PA7
|
||||||
|
#define DOGLCD_SCK PA5
|
||||||
|
#if SD_CONNECTION_IS(ONBOARD)
|
||||||
|
#define FORCE_SOFT_SPI
|
||||||
|
#endif
|
||||||
|
//#define LCD_SCREEN_ROT_180
|
||||||
|
|
||||||
#else // !MKS_MINI_12864
|
#else // !MKS_MINI_12864
|
||||||
|
|
||||||
@ -342,6 +370,10 @@
|
|||||||
#define W25QXX_SCK_PIN PB13
|
#define W25QXX_SCK_PIN PB13
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef BEEPER_PIN
|
||||||
|
#define BEEPER_PIN PC5
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(SPEAKER) && BEEPER_PIN == PC5
|
#if ENABLED(SPEAKER) && BEEPER_PIN == PC5
|
||||||
#error "MKS Robin nano default BEEPER_PIN is not a SPEAKER."
|
#error "MKS Robin nano default BEEPER_PIN is not a SPEAKER."
|
||||||
#endif
|
#endif
|
||||||
|
@ -166,6 +166,7 @@
|
|||||||
#define DOGLCD_SCK PB13
|
#define DOGLCD_SCK PB13
|
||||||
#define FORCE_SOFT_SPI
|
#define FORCE_SOFT_SPI
|
||||||
#define SOFTWARE_SPI
|
#define SOFTWARE_SPI
|
||||||
|
//#define LCD_SCREEN_ROT_180
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -345,6 +345,7 @@
|
|||||||
#if SD_CONNECTION_IS(ONBOARD)
|
#if SD_CONNECTION_IS(ONBOARD)
|
||||||
#define FORCE_SOFT_SPI
|
#define FORCE_SOFT_SPI
|
||||||
#endif
|
#endif
|
||||||
|
//#define LCD_SCREEN_ROT_180
|
||||||
|
|
||||||
#else // !MKS_MINI_12864
|
#else // !MKS_MINI_12864
|
||||||
|
|
||||||
|
@ -365,6 +365,7 @@
|
|||||||
#if SD_CONNECTION_IS(ONBOARD)
|
#if SD_CONNECTION_IS(ONBOARD)
|
||||||
#define FORCE_SOFT_SPI
|
#define FORCE_SOFT_SPI
|
||||||
#endif
|
#endif
|
||||||
|
//#define LCD_SCREEN_ROT_180
|
||||||
|
|
||||||
#else // !MKS_MINI_12864
|
#else // !MKS_MINI_12864
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user