Emulated DOGM via HAL TFT, XPT IO (#19017)
This commit is contained in:
@@ -127,10 +127,10 @@
|
||||
#define PS_ON_PIN PA3 // PW_OFF
|
||||
|
||||
//#define SUICIDE_PIN PB2 // Enable MKSPWC support ROBIN NANO v1.2 ONLY
|
||||
//#define SUICIDE_PIN_INVERTING false
|
||||
//#define SUICIDE_PIN_INVERTING false
|
||||
|
||||
//#define KILL_PIN PA2 // Enable MKSPWC support ROBIN NANO v1.2 ONLY
|
||||
//#define KILL_PIN_INVERTING true // Enable MKSPWC support ROBIN NANO v1.2 ONLY
|
||||
//#define KILL_PIN_INVERTING true // Enable MKSPWC support ROBIN NANO v1.2 ONLY
|
||||
|
||||
#define SERVO0_PIN PA8 // Enable BLTOUCH support ROBIN NANO v1.2 ONLY
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
#define MT_DET_1_PIN PA4
|
||||
#define MT_DET_2_PIN PE6
|
||||
#define MT_DET_PIN_INVERTING false
|
||||
#define MT_DET_PIN_INVERTING false
|
||||
|
||||
#define WIFI_IO0_PIN PC13
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
#endif
|
||||
|
||||
#define SDIO_SUPPORT
|
||||
#define SDIO_CLOCK 4500000 // 4.5 MHz
|
||||
#define SDIO_CLOCK 4500000 // 4.5 MHz
|
||||
#define SD_DETECT_PIN PD12
|
||||
#define ONBOARD_SD_CS_PIN PC11
|
||||
|
||||
@@ -165,8 +165,8 @@
|
||||
* to let the bootloader init the screen.
|
||||
*/
|
||||
|
||||
#if ENABLED(TFT_LVGL_UI_FSMC)
|
||||
|
||||
// Shared FSMC Configs
|
||||
#if HAS_FSMC_TFT
|
||||
#define FSMC_CS_PIN PD7 // NE4
|
||||
#define FSMC_RS_PIN PD11 // A0
|
||||
|
||||
@@ -175,59 +175,10 @@
|
||||
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
|
||||
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
|
||||
|
||||
#define LCD_BACKLIGHT_PIN PD13
|
||||
|
||||
#define XPT2046_X_CALIBRATION 17880
|
||||
#define XPT2046_Y_CALIBRATION -12234
|
||||
#define XPT2046_X_OFFSET -45
|
||||
#define XPT2046_Y_OFFSET 349
|
||||
|
||||
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
|
||||
#define FSMC_CS_PIN PD7
|
||||
#define FSMC_RS_PIN PD11
|
||||
#define FSMC_DMA_DEV DMA2
|
||||
#define FSMC_DMA_CHANNEL DMA_CH5
|
||||
|
||||
#elif ENABLED(FSMC_GRAPHICAL_TFT)
|
||||
|
||||
#define DOGLCD_MOSI -1 // prevent redefine Conditionals_post.h
|
||||
#define DOGLCD_SCK -1
|
||||
|
||||
#ifndef FSMC_UPSCALE
|
||||
#define FSMC_UPSCALE 3
|
||||
#endif
|
||||
#ifndef LCD_FULL_PIXEL_WIDTH
|
||||
#define LCD_FULL_PIXEL_WIDTH 480
|
||||
#endif
|
||||
#ifndef LCD_PIXEL_OFFSET_X
|
||||
#define LCD_PIXEL_OFFSET_X 48
|
||||
#endif
|
||||
#ifndef LCD_FULL_PIXEL_HEIGHT
|
||||
#define LCD_FULL_PIXEL_HEIGHT 320
|
||||
#endif
|
||||
#ifndef LCD_PIXEL_OFFSET_Y
|
||||
#define LCD_PIXEL_OFFSET_Y 32
|
||||
#endif
|
||||
|
||||
#define FSMC_CS_PIN PD7 // NE4
|
||||
#define FSMC_RS_PIN PD11 // A0
|
||||
|
||||
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
|
||||
#define FSMC_DMA_DEV DMA2
|
||||
#define FSMC_DMA_CHANNEL DMA_CH5
|
||||
|
||||
#define LCD_RESET_PIN PC6 // FSMC_RST
|
||||
#define LCD_BACKLIGHT_PIN PD13
|
||||
|
||||
#if NEED_TOUCH_PINS
|
||||
#define TOUCH_CS_PIN PA7 // SPI2_NSS
|
||||
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
|
||||
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
|
||||
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
|
||||
#endif
|
||||
|
||||
#elif ENABLED(TFT_480x320)
|
||||
#define TFT_RESET_PIN PC6
|
||||
#define TFT_RESET_PIN PC6 // FSMC_RST
|
||||
#define TFT_BACKLIGHT_PIN PD13
|
||||
|
||||
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
|
||||
@@ -236,23 +187,66 @@
|
||||
#define FSMC_DMA_DEV DMA2
|
||||
#define FSMC_DMA_CHANNEL DMA_CH5
|
||||
|
||||
#define TOUCH_BUTTONS_HW_SPI
|
||||
#define TOUCH_BUTTONS_HW_SPI_DEVICE 2
|
||||
#endif
|
||||
|
||||
// LVGL Configs
|
||||
#if ENABLED(TFT_LVGL_UI_FSMC)
|
||||
|
||||
#define XPT2046_X_CALIBRATION 17880
|
||||
#define XPT2046_Y_CALIBRATION -12234
|
||||
#define XPT2046_X_OFFSET -45
|
||||
#define XPT2046_Y_OFFSET 349
|
||||
|
||||
#define TOUCH_CS_PIN PA7 // SPI2_NSS
|
||||
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
|
||||
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
|
||||
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
|
||||
// Emulated DOGM Configs
|
||||
#elif ENABLED(FSMC_GRAPHICAL_TFT)
|
||||
|
||||
#define TFT_DRIVER ILI9488
|
||||
#define TFT_BUFFER_SIZE 14400
|
||||
#define DOGLCD_MOSI -1 // prevent redefine Conditionals_post.h
|
||||
#define DOGLCD_SCK -1
|
||||
|
||||
#ifndef GRAPHICAL_TFT_UPSCALE
|
||||
#define GRAPHICAL_TFT_UPSCALE 3
|
||||
#endif
|
||||
#ifndef TFT_WIDTH
|
||||
#define TFT_WIDTH 480
|
||||
#endif
|
||||
#ifndef TFT_PIXEL_OFFSET_X
|
||||
#define TFT_PIXEL_OFFSET_X 48
|
||||
#endif
|
||||
#ifndef TFT_HEIGHT
|
||||
#define TFT_HEIGHT 320
|
||||
#endif
|
||||
#ifndef TFT_PIXEL_OFFSET_Y
|
||||
#define TFT_PIXEL_OFFSET_Y 32
|
||||
#endif
|
||||
|
||||
#ifndef XPT2046_X_CALIBRATION
|
||||
#define XPT2046_X_CALIBRATION 12149
|
||||
#endif
|
||||
#ifndef XPT2046_Y_CALIBRATION
|
||||
#define XPT2046_Y_CALIBRATION -8746
|
||||
#endif
|
||||
#ifndef XPT2046_X_OFFSET
|
||||
#define XPT2046_X_OFFSET -35
|
||||
#endif
|
||||
#ifndef XPT2046_Y_OFFSET
|
||||
#define XPT2046_Y_OFFSET 256
|
||||
#endif
|
||||
|
||||
#elif ENABLED(TFT_480x320)
|
||||
#define XPT2046_X_CALIBRATION 17880
|
||||
#define XPT2046_Y_CALIBRATION -12234
|
||||
#define XPT2046_X_OFFSET -45
|
||||
#define XPT2046_Y_OFFSET 349
|
||||
|
||||
#define TFT_DRIVER ILI9488
|
||||
#define TFT_BUFFER_SIZE 14400
|
||||
#define ILI9488_ORIENTATION ILI9488_MADCTL_MX | ILI9488_MADCTL_MV
|
||||
#endif
|
||||
|
||||
#define HAS_SPI_FLASH 1
|
||||
#define SPI_FLASH_SIZE 0x1000000 // 16MB
|
||||
#define HAS_SPI_FLASH 1
|
||||
#define SPI_FLASH_SIZE 0x1000000 // 16MB
|
||||
#if HAS_SPI_FLASH
|
||||
#define W25QXX_CS_PIN PB12
|
||||
#define W25QXX_MOSI_PIN PB15
|
||||
|
||||
Reference in New Issue
Block a user