chore: Remove unused LCD_DUAL_BUFFER (#4387)

This commit is contained in:
Risto
2023-12-08 10:00:30 +10:00
committed by GitHub
parent 7206182742
commit d1768025db
5 changed files with 4 additions and 30 deletions
+1 -7
View File
@@ -39,13 +39,7 @@
#include "switches.h" #include "switches.h"
#endif #endif
#if (defined(PCBX9E) || defined(PCBX9DP)) && defined(LCD_DUAL_BUFFER) pixel_t displayBuf[DISPLAY_BUFFER_SIZE] __DMA;
pixel_t displayBuf1[DISPLAY_BUFFER_SIZE] __DMA;
pixel_t displayBuf2[DISPLAY_BUFFER_SIZE] __DMA;
pixel_t * displayBuf = displayBuf1;
#else
pixel_t displayBuf[DISPLAY_BUFFER_SIZE] __DMA;
#endif
inline bool lcdIsPointOutside(coord_t x, coord_t y) inline bool lcdIsPointOutside(coord_t x, coord_t y)
{ {
+1 -8
View File
@@ -88,14 +88,7 @@
#define DISPLAY_BUFFER_SIZE (LCD_W*LCD_H*4/8) #define DISPLAY_BUFFER_SIZE (LCD_W*LCD_H*4/8)
#if (defined(PCBX9E) || defined(PCBX9DP)) && defined(LCD_DUAL_BUFFER) extern pixel_t displayBuf[DISPLAY_BUFFER_SIZE];
extern pixel_t displayBuf1[DISPLAY_BUFFER_SIZE];
extern pixel_t displayBuf2[DISPLAY_BUFFER_SIZE];
extern pixel_t * displayBuf;
#else
extern pixel_t displayBuf[DISPLAY_BUFFER_SIZE];
#endif
extern coord_t lcdLastRightPos; extern coord_t lcdLastRightPos;
extern coord_t lcdLastLeftPos; extern coord_t lcdLastLeftPos;
extern coord_t lcdNextPos; extern coord_t lcdNextPos;
-5
View File
@@ -1,5 +1,4 @@
option(SHUTDOWN_CONFIRMATION "Shutdown confirmation" OFF) option(SHUTDOWN_CONFIRMATION "Shutdown confirmation" OFF)
option(LCD_DUAL_BUFFER "Dual LCD Buffer" OFF)
option(PXX1 "PXX1 protocol support" ON) option(PXX1 "PXX1 protocol support" ON)
option(PXX2 "PXX2 protocol support" OFF) option(PXX2 "PXX2 protocol support" OFF)
option(AFHDS3 "AFHDS3 TX Module" OFF) option(AFHDS3 "AFHDS3 TX Module" OFF)
@@ -614,8 +613,4 @@ set(FIRMWARE_SRC
targets/common/arm/stm32/diskio_spi.cpp targets/common/arm/stm32/diskio_spi.cpp
) )
if(LCD_DUAL_BUFFER)
add_definitions(-DLCD_DUAL_BUFFER)
endif()
set(RADIO_DEPENDENCIES ${RADIO_DEPENDENCIES} ${BITMAPS_TARGET}) set(RADIO_DEPENDENCIES ${RADIO_DEPENDENCIES} ${BITMAPS_TARGET})
+2 -2
View File
@@ -421,8 +421,8 @@ void lcdInit();
void lcdInitFinish(); void lcdInitFinish();
void lcdOff(); void lcdOff();
// TODO lcdRefreshWait() stub in simpgmspace and remove LCD_DUAL_BUFFER // TODO lcdRefreshWait() stub in simpgmspace
#if defined(LCD_DMA) && !defined(LCD_DUAL_BUFFER) && !defined(SIMU) #if defined(LCD_DMA) && !defined(SIMU)
void lcdRefreshWait(); void lcdRefreshWait();
#else #else
#define lcdRefreshWait() #define lcdRefreshWait()
@@ -204,12 +204,10 @@ void lcdWriteAddress(uint8_t x, uint8_t y)
volatile bool lcd_busy; volatile bool lcd_busy;
#if !defined(LCD_DUAL_BUFFER)
void lcdRefreshWait() void lcdRefreshWait()
{ {
WAIT_FOR_DMA_END(); WAIT_FOR_DMA_END();
} }
#endif
void lcdRefresh(bool wait) void lcdRefresh(bool wait)
{ {
@@ -257,12 +255,6 @@ void lcdRefresh(bool wait)
LCD_DMA_Stream->CR &= ~DMA_SxCR_EN; // Disable DMA LCD_DMA_Stream->CR &= ~DMA_SxCR_EN; // Disable DMA
LCD_DMA->HIFCR = LCD_DMA_FLAGS; // Write ones to clear bits LCD_DMA->HIFCR = LCD_DMA_FLAGS; // Write ones to clear bits
#if defined(LCD_DUAL_BUFFER)
// Switch LCD buffer
LCD_DMA_Stream->M0AR = (uint32_t)displayBuf;
displayBuf = (displayBuf == displayBuf1) ? displayBuf2 : displayBuf1;
#endif
LCD_DMA_Stream->CR |= DMA_SxCR_EN | DMA_SxCR_TCIE; // Enable DMA & TC interrupts LCD_DMA_Stream->CR |= DMA_SxCR_EN | DMA_SxCR_TCIE; // Enable DMA & TC interrupts
LCD_SPI->CR2 |= SPI_CR2_TXDMAEN; LCD_SPI->CR2 |= SPI_CR2_TXDMAEN;
#endif #endif