️ Improve TFT DMA for STM32 (#25359)

This commit is contained in:
Alexander Gavrilenko
2023-03-27 21:17:02 +03:00
committed by GitHub
parent 41487bc9e7
commit e0132f7a1e
25 changed files with 198 additions and 167 deletions

View File

@@ -3292,7 +3292,7 @@
*/
#define TFT_FONT NOTOSANS
//#define TFT_SHARED_SPI // SPI is shared between TFT display and other devices. Disable async data transfer
//#define TFT_SHARED_IO // I/O is shared between TFT display and other devices. Disable async data transfer.
#endif
#if ENABLED(TFT_LVGL_UI)

View File

@@ -139,7 +139,7 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun
DataTransferBegin(DATASIZE_16BIT);
SPIx.dmaSendAsync(Data, Count, MemoryIncrease);
TERN_(TFT_SHARED_SPI, while (isBusy()));
TERN_(TFT_SHARED_IO, while (isBusy()));
}
#endif // HAS_SPI_TFT

View File

@@ -100,11 +100,11 @@ void TFT_FSMC::Init() {
HAL_SRAM_Init(&SRAMx, &Timing, &ExtTiming);
__HAL_RCC_DMA2_CLK_ENABLE();
#ifdef STM32F1xx
DMAtx.Instance = DMA2_Channel1;
__HAL_RCC_DMA1_CLK_ENABLE();
DMAtx.Instance = DMA1_Channel1;
#elif defined(STM32F4xx)
__HAL_RCC_DMA2_CLK_ENABLE();
DMAtx.Instance = DMA2_Stream0;
DMAtx.Init.Channel = DMA_CHANNEL_0;
DMAtx.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
@@ -174,6 +174,8 @@ void TFT_FSMC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou
DMAtx.Init.PeriphInc = MemoryIncrease;
HAL_DMA_Init(&DMAtx);
HAL_DMA_Start(&DMAtx, (uint32_t)Data, (uint32_t)&(LCD->RAM), Count);
TERN_(TFT_SHARED_IO, while (isBusy()));
}
void TFT_FSMC::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) {

View File

@@ -242,7 +242,7 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun
SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); // Enable Tx DMA Request
TERN_(TFT_SHARED_SPI, while (isBusy()));
TERN_(TFT_SHARED_IO, while (isBusy()));
}
@@ -261,6 +261,7 @@ void TFT_SPI::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count)
SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); // Enable Tx DMA Request
HAL_DMA_PollForTransfer(&DMAtx, HAL_DMA_FULL_TRANSFER, HAL_MAX_DELAY);
while ( __HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) {}
Abort();
}

View File

@@ -245,6 +245,8 @@ void TFT_FSMC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou
dma_set_num_transfers(FSMC_DMA_DEV, FSMC_DMA_CHANNEL, Count);
dma_clear_isr_bits(FSMC_DMA_DEV, FSMC_DMA_CHANNEL);
dma_enable(FSMC_DMA_DEV, FSMC_DMA_CHANNEL);
TERN_(TFT_SHARED_IO, while (isBusy()));
}
void TFT_FSMC::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) {

View File

@@ -30,6 +30,13 @@
#include <libmaple/dma.h>
#ifndef FSMC_DMA_DEV
#define FSMC_DMA_DEV DMA2
#endif
#ifndef FSMC_DMA_CHANNEL
#define FSMC_DMA_CHANNEL DMA_CH5
#endif
#define DATASIZE_8BIT DMA_SIZE_8BITS
#define DATASIZE_16BIT DMA_SIZE_16BITS
#define TFT_IO_DRIVER TFT_FSMC

View File

@@ -154,7 +154,7 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun
DataTransferBegin();
SPIx.dmaSendAsync(Data, Count, MemoryIncrease == DMA_MINC_ENABLE);
TERN_(TFT_SHARED_SPI, while (isBusy()));
TERN_(TFT_SHARED_IO, while (isBusy()));
}
void TFT_SPI::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) {

View File

@@ -698,6 +698,8 @@
#error "DISABLE_INACTIVE_[XYZIJKUVWE] is now DISABLE_IDLE_[XYZIJKUVWE]."
#elif defined(DEFAULT_STEPPER_DEACTIVE_TIME)
#error "DEFAULT_STEPPER_DEACTIVE_TIME is now DEFAULT_STEPPER_TIMEOUT_SEC."
#elif defined(TFT_SHARED_SPI)
#error "TFT_SHARED_SPI is now TFT_SHARED_IO."
#endif
// L64xx stepper drivers have been removed

View File

@@ -39,7 +39,7 @@
#define ILI9328_ETMOD_ID0 0x0010 // 0 - Horizontal Decrement / 1 - Horizontal Increment
#define ILI9328_ETMOD_AM 0x0008 // 0 - Horizontal / 1 - Vertical
// MKS Robin TFT v1.1 - 320x240 ; Cable on the left side
// MKS Robin TFT v1.1 - 320x240 ; FPC cable on the left side
#if TFT_ROTATION == TFT_ROTATE_180
#define ILI9328_DRVCTL_DATA 0x0000

View File

@@ -33,10 +33,10 @@
#define ILI9341_MADCTL_RGB 0x00
#define ILI9341_MADCTL_MH 0x04 // Horizontal Refresh Order
#define ILI9341_ORIENTATION_UP ILI9341_MADCTL_MY // 240x320 ; Cable on the upper side
#define ILI9341_ORIENTATION_RIGHT ILI9341_MADCTL_MV // 320x240 ; Cable on the right side
#define ILI9341_ORIENTATION_LEFT ILI9341_MADCTL_MY | ILI9341_MADCTL_MX | ILI9341_MADCTL_MV // 320x240 ; Cable on the left side
#define ILI9341_ORIENTATION_DOWN ILI9341_MADCTL_MX // 240x320 ; Cable on the upper side
#define ILI9341_ORIENTATION_TOP ILI9341_MADCTL_MY // 240x320 ; FPC cable on the top side
#define ILI9341_ORIENTATION_RIGHT ILI9341_MADCTL_MV // 320x240 ; FPC cable on the right side
#define ILI9341_ORIENTATION_LEFT ILI9341_MADCTL_MY | ILI9341_MADCTL_MX | ILI9341_MADCTL_MV // 320x240 ; FPC cable on the left side
#define ILI9341_ORIENTATION_BOTTOM ILI9341_MADCTL_MX // 240x320 ; FPC cable on the bottom side
#define ILI9341_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ILI9341_MADCTL_MV) | \
IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ILI9341_MADCTL_MX) | \
@@ -52,7 +52,7 @@
#define ILI9341_NOP 0x00 // No Operation
#define ILI9341_SWRESET 0x01 // Software Reset
#define ILI9341_RDDIDIF 0x04 // Read display identification information
#define ILI9341_RDDIDIF 0x04 // Read Display Identification Information
#define ILI9341_RDDST 0x09 // Read Display Status
#define ILI9341_RDDPM 0x0A // Read Display Power Mode
#define ILI9341_RDDMADCTL 0x0B // Read Display MADCTL
@@ -141,20 +141,21 @@ static const uint16_t ili9341_init[] = {
DATASIZE_8BIT,
ESC_REG(ILI9341_SWRESET), ESC_DELAY(100),
ESC_REG(ILI9341_SLPOUT), ESC_DELAY(20),
/*
ESC_REG(ILI9341_PWCTRLA), 0x0039, 0x002C, 0x0000, 0x0034, 0x0002, // Power control A
ESC_REG(ILI9341_PWCTRLB), 0x0000, 0x00C1, 0x0030, // Power control B
ESC_REG(ILI9341_DRVTCTLA1), 0x0085, 0x0000, 0x0078, // Driver timing control A
ESC_REG(ILI9341_DRVTCTLB), 0x0000, 0x0000, // Driver timing control B
ESC_REG(ILI9341_PONSEQCTL), 0x0064, 0x0003, 0x0012, 0x0081, // Power on sequence control
ESC_REG(ILI9341_DISCTRL), 0x0008, 0x0082, 0x0027, // Display Function Control
ESC_REG(ILI9341_PUMPRCTL), 0x0020, // Pump ratio control
ESC_REG(ILI9341_VMCTRL1), 0x003E, 0x0028, // VCOM Control 1
ESC_REG(ILI9341_VMCTRL2), 0x0086, // VCOM Control 2
ESC_REG(ILI9341_FRMCTR1), 0x0000, 0x0018, // Frame Rate Control (In Normal Mode/Full Colors)
ESC_REG(ILI9341_PWCTRL1), 0x0023, // Power Control 1
ESC_REG(ILI9341_PWCTRL2), 0x0010, // Power Control 2
*/
ESC_REG(ILI9341_PWCTRLA), 0x0039, 0x002C, 0x0000, 0x0034, 0x0002,
ESC_REG(ILI9341_PWCTRLB), 0x0000, 0x00C1, 0x0030,
ESC_REG(ILI9341_DRVTCTLA1), 0x0085, 0x0000, 0x0078,
ESC_REG(ILI9341_DRVTCTLB), 0x0000, 0x0000,
ESC_REG(ILI9341_PONSEQCTL), 0x0064, 0x0003, 0x0012, 0x0081,
ESC_REG(ILI9341_DISCTRL), 0x0008, 0x0082, 0x0027, // Source Output Scan Direction: 0, Gate Output Scan Direction: 0
ESC_REG(ILI9341_DINVOFF),
ESC_REG(ILI9341_PUMPRCTL), 0x0020,
ESC_REG(ILI9341_VMCTRL1), 0x003E, 0x0028,
ESC_REG(ILI9341_VMCTRL2), 0x0086,
ESC_REG(ILI9341_FRMCTR1), 0x0000, 0x0018,
ESC_REG(ILI9341_PWCTRL1), 0x0023,
ESC_REG(ILI9341_PWCTRL2), 0x0010,
ESC_REG(ILI9341_MADCTL), ILI9341_MADCTL_DATA,
ESC_REG(ILI9341_PIXSET), 0x0055,

View File

@@ -33,10 +33,10 @@
#define ILI9488_MADCTL_RGB 0x00
#define ILI9488_MADCTL_MH 0x04 // Horizontal Refresh Order
#define ILI9488_ORIENTATION_UP ILI9488_MADCTL_MY // 320x480 ; Cable on the upper side
#define ILI9488_ORIENTATION_RIGHT ILI9488_MADCTL_MV // 480x320 ; Cable on the right side
#define ILI9488_ORIENTATION_LEFT ILI9488_MADCTL_MY | ILI9488_MADCTL_MX | ILI9488_MADCTL_MV // 480x320 ; Cable on the left side
#define ILI9488_ORIENTATION_DOWN ILI9488_MADCTL_MX // 320x480 ; Cable on the upper side
#define ILI9488_ORIENTATION_TOP ILI9488_MADCTL_MY // 320x480 ; FPC cable on the top side
#define ILI9488_ORIENTATION_RIGHT ILI9488_MADCTL_MV // 480x320 ; FPC cable on the right side
#define ILI9488_ORIENTATION_LEFT ILI9488_MADCTL_MY | ILI9488_MADCTL_MX | ILI9488_MADCTL_MV // 480x320 ; FPC cable on the left side
#define ILI9488_ORIENTATION_BOTTOM ILI9488_MADCTL_MX // 320x480 ; FPC cable on the bottom side
#define ILI9488_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ILI9488_MADCTL_MV) | \
IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ILI9488_MADCTL_MX) | \
@@ -146,6 +146,16 @@
#define ILI9488_ADJCTL6 0xFC // Adjust Control 6
#define ILI9488_ADJCTL7 0xFF // Adjust Control 7
#if 0
// https://forum.mikroe.com/viewtopic.php?t=74586
#if ANY(MKS_ROBIN_TFT35, TFT_TRONXY_X5SA, ANYCUBIC_TFT35) // ILI9488
#define TFT_DRIVER ILI9488
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
#define TFT_RES_480x320
#define TFT_INTERFACE_FSMC
#endif
#endif
static const uint16_t ili9488_init[] = {
DATASIZE_8BIT,
ESC_REG(ILI9488_SWRESET), ESC_DELAY(120),
@@ -154,10 +164,20 @@ static const uint16_t ili9488_init[] = {
ESC_REG(ILI9488_MADCTL), ILI9488_MADCTL_DATA,
ESC_REG(ILI9488_COLMOD), 0x0055,
ESC_REG(ILI9488_FRMCTR1), 0x00A0,
ESC_REG(ILI9488_INVTR), 0x0002,
ESC_REG(ILI9488_DISCTRL), 0x0002, 0x0002, // Gate Scan sequence: 0, Source Scan sequence: 0
ESC_REG(ILI9488_PWCTRL1), 0x0015, 0x0017,
ESC_REG(ILI9488_PWCTRL2), 0x0041,
ESC_REG(ILI9488_VMCTRL), 0x0000, 0x0012, 0x0080,
ESC_REG(ILI9488_SETIMAGE), 0x0000,
ESC_REG(ILI9488_ADJCTL3), 0x00A9, 0x0051, 0x002C, 0x0082,
/* Gamma Correction. */
ESC_REG(ILI9488_PGAMCTRL), 0x0000, 0x0003, 0x0009, 0x0008, 0x0016, 0x000A, 0x003F, 0x0078, 0x004C, 0x0009, 0x000A, 0x0008, 0x0016, 0x001A, 0x000F,
ESC_REG(ILI9488_NGAMCTRL), 0x0000, 0x0016, 0x0019, 0x0003, 0x000F, 0x0005, 0x0032, 0x0045, 0x0046, 0x0004, 0x000E, 0x000D, 0x0035, 0x0037, 0x000F,
ESC_REG(TERN(ILI9488_INVERTED, ILI9488_INVON, ILI9488_INVOFF)), // Display inversion
ESC_REG(ILI9488_NORON),
ESC_REG(ILI9488_DISON),
ESC_END

View File

@@ -41,7 +41,7 @@
#define R61505_DRVCTRL_GS 0x8000 // Gate Scan direction
// MKS Robin TFT v1.1 - 320x240 ; Cable on the left side
// MKS Robin TFT v1.1 - 320x240 ; FPC cable on the left side
#if TFT_ROTATION == TFT_ROTATE_180
#define R61505_DRVCTL_DATA 0x0000

View File

@@ -33,10 +33,11 @@
#define ST7789V_MADCTL_RGB 0x00
#define ST7789V_MADCTL_MH 0x04 // Horizontal Refresh Order
#define ST7789V_ORIENTATION_UP ST7789V_MADCTL_MX | ST7789V_MADCTL_MY // 240x320 ; Cable on the upper side
#define ST7789V_ORIENTATION_RIGHT ST7789V_MADCTL_MX | ST7789V_MADCTL_MV // 320x240 ; Cable on the right side
#define ST7789V_ORIENTATION_LEFT ST7789V_MADCTL_MY | ST7789V_MADCTL_MV // 320x240 ; Cable on the left side
#define ST7789V_ORIENTATION_DOWN 0 // 240x320 ; Cable on the lower side
// ST7789V-specific: "MX Inversion" is enabled by default in LCM Control register.
#define ST7789V_ORIENTATION_TOP ST7789V_MADCTL_MX | ST7789V_MADCTL_MY // 240x320 ; PFC cable on the top side
#define ST7789V_ORIENTATION_RIGHT ST7789V_MADCTL_MX | ST7789V_MADCTL_MV // 320x240 ; PFC cable on the right side
#define ST7789V_ORIENTATION_LEFT ST7789V_MADCTL_MY | ST7789V_MADCTL_MV // 320x240 ; PFC cable on the left side
#define ST7789V_ORIENTATION_BOTTOM 0 // 240x320 ; PFC cable on the bottom side
#define ST7789V_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ST7789V_MADCTL_MV) | \
IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ST7789V_MADCTL_MX) | \
@@ -141,7 +142,22 @@ static const uint16_t st7789v_init[] = {
ESC_REG(ST7789V_PORCTRL), 0x000C, 0x000C, 0x0000, 0x0033, 0x0033,
ESC_REG(ST7789V_GCTRL), 0x0035,
ESC_REG(ST7789V_VCOMS), 0x001F,
ESC_REG(ST7789V_LCMCTRL), 0x002C,
/**
* LCM Control
*
* Default Power-on Value: 0x2C / 00101100b
* MY Inversion: 0
* RGB/BGR Inversion: 1
* Display Inversion: 0
* MX Inversion: 1
* MH (Source Output) Inversion: 1
* MV Inversion: 0
* Gate Scan Inversion: 0
*/
ESC_REG(ST7789V_LCMCTRL), 0x002C, // Default Power-on Value
ESC_REG(ST7789V_GATECTRL), 0x0027, 0x0000, 0x0010, // Gate Scan Direction: 0
ESC_REG(ST7789V_VDVVRHEN), 0x0001, 0x00C3,
ESC_REG(ST7789V_VDVS), 0x0020,
ESC_REG(ST7789V_FRCTRL2), 0x000F,

View File

@@ -33,6 +33,11 @@
#define ST7796S_MADCTL_RGB 0x00
#define ST7796S_MADCTL_MH 0x04 // Horizontal Refresh Order
#define ST7796S_ORIENTATION_TOP ST7796S_MADCTL_MX // 320x480 ; FPC cable on the top side
#define ST7796S_ORIENTATION_RIGHT ST7796S_MADCTL_MV // 480x320 ; FPC cable on the right side
#define ST7796S_ORIENTATION_LEFT ST7796S_MADCTL_MY | ST7796S_MADCTL_MX | ST7796S_MADCTL_MV // 480x320 ; FPC cable on the left side
#define ST7796S_ORIENTATION_BOTTOM ST7796S_MADCTL_MY // 320x480 ; FPC cable on the bottom side
#define ST7796S_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ST7796S_MADCTL_MV) | \
IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ST7796S_MADCTL_MX) | \
IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, ST7796S_MADCTL_MY)
@@ -132,6 +137,7 @@ static const uint16_t st7796s_init[] = {
ESC_REG(ST7796S_COLMOD), 0x0055,
ESC_REG(ST7796S_DIC), 0x0001, // 1-dot inversion
ESC_REG(ST7796S_DFC), 0x0080, 0x0002, 0x003B, // Source Output Scan Direction: 0, Gate Output Scan Direction: 0
ESC_REG(ST7796S_EM), 0x00C6,
ESC_REG(ST7796S_PWR2), 0x0015,
@@ -144,11 +150,7 @@ static const uint16_t st7796s_init[] = {
ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D,
ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D,
#if ENABLED(ST7796S_INVERTED)
ESC_REG(ST7796S_INVON), // Display inversion ON
#else
ESC_REG(ST7796S_NORON),
#endif
ESC_REG(TERN(ST7796S_INVERTED, ST7796S_INVON, ST7796S_NORON)), // Display inversion
ESC_REG(ST7796S_WRCTRLD), 0x0024,
ESC_REG(ST7796S_CSCON), 0x003C, // disable command 2 part I
ESC_REG(ST7796S_CSCON), 0x0069, // disable command 2 part II

View File

@@ -140,8 +140,6 @@
#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
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN

View File

@@ -293,8 +293,6 @@
#define TFT_BACKLIGHT_PIN PD13
#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 FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0

View File

@@ -117,8 +117,6 @@
#define FSMC_RS_PIN PG0
#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 TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN

View File

@@ -138,8 +138,6 @@
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1
#define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN

View File

@@ -143,8 +143,6 @@
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PG0 // A0
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN

View File

@@ -176,8 +176,6 @@
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_CS_PIN PG12 // NE4
#define FSMC_RS_PIN PF0 // A0
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN

View File

@@ -160,8 +160,6 @@
#define FSMC_RS_PIN TFT_RS_PIN // 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
#if NEED_TOUCH_PINS
#define TOUCH_CS_PIN PC2 // SPI2_NSS

View File

@@ -196,8 +196,6 @@
#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
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN

View File

@@ -231,8 +231,6 @@
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN

View File

@@ -153,8 +153,6 @@
#define TFT_RS_PIN FSMC_RS_PIN
#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 ANYCUBIC_TFT35
#else

View File

@@ -200,8 +200,6 @@
#define TFT_BACKLIGHT_PIN PG8
#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 TFT_CS_PIN PG12
#define TFT_RS_PIN PG2