Add the definition LCD_VERTICAL_INVERT
This commit is contained in:
@@ -131,7 +131,7 @@ BitmapBuffer * lcd = &_lcd;
|
||||
|
||||
void DMAFillRect(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color)
|
||||
{
|
||||
#if defined(PCBX10) && !defined(SIMU)
|
||||
#if defined(LCD_VERTICAL_INVERT)
|
||||
x = destw - (x + w);
|
||||
y = desth - (y + h);
|
||||
#endif
|
||||
@@ -145,7 +145,7 @@ void DMAFillRect(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, ui
|
||||
|
||||
void DMACopyBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint16_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h)
|
||||
{
|
||||
#if defined(PCBX10) && !defined(SIMU)
|
||||
#if defined(LCD_VERTICAL_INVERT)
|
||||
x = destw - (x + w);
|
||||
y = desth - (y + h);
|
||||
srcx = srcw - (srcx + w);
|
||||
@@ -159,7 +159,7 @@ void DMACopyBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x,
|
||||
|
||||
void DMACopyAlphaBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint16_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h)
|
||||
{
|
||||
#if defined(PCBX10) && !defined(SIMU)
|
||||
#if defined(LCD_VERTICAL_INVERT)
|
||||
x = destw - (x + w);
|
||||
y = desth - (y + h);
|
||||
srcx = srcw - (srcx + w);
|
||||
|
||||
@@ -81,7 +81,7 @@ inline void lcdClear()
|
||||
lcd->clear();
|
||||
}
|
||||
|
||||
#if defined(PCBX10) && !defined(SIMU)
|
||||
#if defined(LCD_VERTICAL_INVERT)
|
||||
#define PIXEL_PTR(x, y) &displayBuf[(LCD_H*LCD_W-1) - (y)*LCD_W - (x)]
|
||||
#else
|
||||
#define PIXEL_PTR(x, y) &displayBuf[(y)*LCD_W + (x)]
|
||||
|
||||
@@ -45,14 +45,14 @@ void init5msTimer()
|
||||
|
||||
void stop5msTimer()
|
||||
{
|
||||
INTERRUPT_xMS_TIMER->CR1 = 0 ; // stop timer
|
||||
NVIC_DisableIRQ(INTERRUPT_xMS_IRQn) ;
|
||||
INTERRUPT_xMS_TIMER->CR1 = 0; // stop timer
|
||||
NVIC_DisableIRQ(INTERRUPT_xMS_IRQn);
|
||||
}
|
||||
|
||||
// TODO use the same than board_sky9x.cpp
|
||||
void interrupt5ms()
|
||||
{
|
||||
static uint8_t pre_scale; // Used to get 10 Hz counter
|
||||
static uint8_t pre_scale; // Used to get 10 Hz counter
|
||||
|
||||
++pre_scale;
|
||||
|
||||
|
||||
@@ -417,6 +417,9 @@
|
||||
#define LCD_GPIO_NRST GPIOI
|
||||
#define LCD_GPIO_PIN_NRST GPIO_Pin_10 // PI.10
|
||||
#endif
|
||||
#if defined(PCBX10) && !defined(SIMU)
|
||||
#define LCD_VERTICAL_INVERT
|
||||
#endif
|
||||
#define LTDC_IRQ_PRIO 4
|
||||
#define DMA_SCREEN_IRQ_PRIO 6
|
||||
|
||||
|
||||
@@ -357,7 +357,7 @@ void lcdInit()
|
||||
|
||||
void DMAFillRect(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color)
|
||||
{
|
||||
#if defined(PCBX10)
|
||||
#if defined(LCD_VERTICAL_INVERT)
|
||||
x = destw - (x + w);
|
||||
y = desth - (y + h);
|
||||
#endif
|
||||
@@ -386,7 +386,7 @@ void DMAFillRect(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, ui
|
||||
|
||||
void DMACopyBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint16_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h)
|
||||
{
|
||||
#if defined(PCBX10)
|
||||
#if defined(LCD_VERTICAL_INVERT)
|
||||
x = destw - (x + w);
|
||||
y = desth - (y + h);
|
||||
srcx = srcw - (srcx + w);
|
||||
@@ -426,7 +426,7 @@ void DMACopyBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x,
|
||||
|
||||
void DMACopyAlphaBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint16_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h)
|
||||
{
|
||||
#if defined(PCBX10)
|
||||
#if defined(LCD_VERTICAL_INVERT)
|
||||
x = destw - (x + w);
|
||||
y = desth - (y + h);
|
||||
srcx = srcw - (srcx + w);
|
||||
|
||||
@@ -41,7 +41,7 @@ void doPaint_colorlcd(QPainter & p)
|
||||
uint16_t previousColor = 0xFF;
|
||||
for (int y=0; y<LCD_H; y++) {
|
||||
for (int x=0; x<LCD_W; x++) {
|
||||
#if defined(PCBX10) && !defined(SIMU)
|
||||
#if defined(LCD_VERTICAL_INVERT)
|
||||
uint16_t color = simuLcdBuf[(LCD_W-1-x)+LCD_W*(LCD_H-1-y)]; // color in RGB565
|
||||
#else
|
||||
uint16_t color = simuLcdBuf[x+LCD_W*y]; // color in RGB565
|
||||
|
||||
Vendored
+1
-1
Submodule radio/src/thirdparty/libopenui updated: 04e6ba5ae8...882e53546b
Reference in New Issue
Block a user