Preliminary T18 support (#7581)

This commit is contained in:
3djc
2020-06-22 21:15:47 +02:00
committed by GitHub
parent 02b61fff24
commit 2d01916055
76 changed files with 952 additions and 426 deletions
+24 -9
View File
@@ -20,14 +20,25 @@
#include "opentx.h"
#define HBP 42
#define VBP 12
#if defined(RADIO_T18)
#define HBP 43
#define VBP 12
#define HSW 2
#define VSW 10
#define HSW 2
#define VSW 4
#define HFP 3
#define VFP 2
#define HFP 8
#define VFP 8
#else
#define HBP 42
#define VBP 12
#define HSW 2
#define VSW 10
#define HFP 3
#define VFP 2
#endif
#define LCD_FIRST_LAYER 0
#define LCD_SECOND_LAYER 1
@@ -315,7 +326,11 @@ void LCD_Init(void)
{
/* Reset the LCD --------------------------------------------------------*/
LCD_NRSTConfig();
#if defined(RADIO_T18) // T18 seems to have eractic display issue if NRST is ever driven low
NRST_HIGH();
#else
lcd_reset();
#endif
/* Configure the LCD Control pins */
LCD_AF_GPIOConfig();
@@ -383,7 +398,7 @@ void lcdInit(void)
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
@@ -415,7 +430,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);
@@ -458,7 +473,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);