Browse Source

TFT: Restore ILI9341 colors and reversed logic (#19010)

Followup to #18877, #18901, #18817
Tanguy Pruvot 4 years ago
parent
commit
567d77f1cb
No account linked to committer's email address

+ 4
- 1
Marlin/src/lcd/dogm/u8g_dev_tft_320x240_upscale_from_128x64.cpp View File

366
 static const uint16_t ili9341_init[] = {
366
 static const uint16_t ili9341_init[] = {
367
   ESC_REG(0x0010), ESC_DELAY(10),
367
   ESC_REG(0x0010), ESC_DELAY(10),
368
   ESC_REG(0x0001), ESC_DELAY(200),
368
   ESC_REG(0x0001), ESC_DELAY(200),
369
-  ESC_REG(0x0036), TERN(GRAPHICAL_TFT_ROTATE_180, 0x00E8, 0x0028),
369
+  ESC_REG(0x0036), TERN(GRAPHICAL_TFT_ROTATE_180, 0x0028, 0x00E8),
370
   ESC_REG(0x003A), 0x0055,
370
   ESC_REG(0x003A), 0x0055,
371
   ESC_REG(0x002A), 0x0000, 0x0000, 0x0001, 0x003F,
371
   ESC_REG(0x002A), 0x0000, 0x0000, 0x0001, 0x003F,
372
   ESC_REG(0x002B), 0x0000, 0x0000, 0x0000, 0x00EF,
372
   ESC_REG(0x002B), 0x0000, 0x0000, 0x0000, 0x00EF,
658
           setWindow = setWindow_ili9328;
658
           setWindow = setWindow_ili9328;
659
           break;
659
           break;
660
         case 0x9341:   // ILI9341
660
         case 0x9341:   // ILI9341
661
+          WRITE_ESC_SEQUENCE(ili9341_init);
662
+          setWindow = setWindow_st7789v;
663
+          break;
661
         case 0x8066:   // Anycubic / TronXY TFTs (480x320)
664
         case 0x8066:   // Anycubic / TronXY TFTs (480x320)
662
           WRITE_ESC_SEQUENCE(ili9488_init);
665
           WRITE_ESC_SEQUENCE(ili9488_init);
663
           setWindow = setWindow_st7789v;
666
           setWindow = setWindow_st7789v;

+ 6
- 0
Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h View File

130
 #define DOGLCD_MOSI                         -1    // Prevent auto-define by Conditionals_post.h
130
 #define DOGLCD_MOSI                         -1    // Prevent auto-define by Conditionals_post.h
131
 #define DOGLCD_SCK                          -1
131
 #define DOGLCD_SCK                          -1
132
 
132
 
133
+#define FSMC_UPSCALE                           2
134
+#define LCD_FULL_PIXEL_WIDTH                 320
135
+#define LCD_FULL_PIXEL_HEIGHT                240
136
+#define LCD_PIXEL_OFFSET_X                    32
137
+#define LCD_PIXEL_OFFSET_Y                    32
138
+
133
 /**
139
 /**
134
  * Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer
140
  * Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer
135
  * mixed up MOSI and MISO pins. SPI is managed in SW, and needs pins
141
  * mixed up MOSI and MISO pins. SPI is managed in SW, and needs pins

Loading…
Cancel
Save