Skip to content

Commit 76785a2

Browse files
committed
rg_display: Added compile error if RG_SCREEN_ROTATE is used in ILI driver
1 parent c473a53 commit 76785a2

File tree

8 files changed

+13
-9
lines changed

8 files changed

+13
-9
lines changed

components/retro-go/drivers/display/ili9341.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
#include <driver/gpio.h>
55
#include <driver/ledc.h>
66

7+
#if defined(RG_SCREEN_ROTATE) && RG_SCREEN_ROTATE != 0
8+
#error "RG_SCREEN_ROTATE doesn't do anything on this driver, you have to use the 0x36 command during init!"
9+
#endif
10+
711
static spi_device_handle_t spi_dev;
812
static QueueHandle_t spi_transactions;
913
static QueueHandle_t spi_buffers;

components/retro-go/targets/byteboi-rev1/config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
ILI9341_CMD(0xEA, 0x00, 0x00); \
3434
ILI9341_CMD(0xC0, 0x23); /* Power control //VRH[5:0] */ \
3535
ILI9341_CMD(0xC1, 0x10); /* Power control //SAP[2:0];BT[3:0] */ \
36-
ILI9341_CMD(0xC5, 0x3e,0x28); /* VCM control */ \
36+
ILI9341_CMD(0xC5, 0x3e,0x28); /* VCM control */ \
3737
ILI9341_CMD(0xC7, 0x86); /* VCM control2 */ \
38-
ILI9341_CMD(0x36, (0x20 | 0x80 | 0x08)); /* Memory Access Control */ \
38+
ILI9341_CMD(0x36, 0xA8); /* Memory Access Control (MY|MV|BGR) */ \
3939
ILI9341_CMD(0xB1, 0x00, 0x10); /* Frame Rate Control (1B=70, 1F=61, 10=119) */ \
40-
ILI9341_CMD(0xB6, 0x08, 0xC2, 0x27); /* Display Function Control */ \
40+
ILI9341_CMD(0xB6, 0x08, 0xC2, 0x27); /* Display Function Control */ \
4141
ILI9341_CMD(0xF6, 0x01, 0x30); \
4242
ILI9341_CMD(0xF2, 0x00); /* 3Gamma Function Disable */ \
4343
ILI9341_CMD(0x26, 0x01); /* Gamma curve selected */ \

components/retro-go/targets/esp32s3-devkit-c/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
ILI9341_CMD(0xC1, 0x12); /* Power control //SAP[2:0];BT[3:0] */ \
3535
ILI9341_CMD(0xC5, 0x32, 0x3C); /* VCM control */ \
3636
ILI9341_CMD(0xC7, 0x91); /* VCM control2 */ \
37-
ILI9341_CMD(0x36, (0x60|0x08)); /* Memory Access Control (0x20|0x80|0x08) */ \
37+
ILI9341_CMD(0x36, 0x68); /* Memory Access Control (MX|MV|BGR) */ \
3838
ILI9341_CMD(0xB1, 0x00, 0x10); /* Frame Rate Control (1B=70, 1F=61, 10=119) */ \
3939
ILI9341_CMD(0xB6, 0x0A, 0xA2); /* Display Function Control */ \
4040
ILI9341_CMD(0xF6, 0x01, 0x30); \

components/retro-go/targets/esplay-micro/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
ILI9341_CMD(0xC0, 0x26); /* Power control */ \
3434
ILI9341_CMD(0xC1, 0x11); /* Power control */ \
3535
ILI9341_CMD(0xC5, 0x35, 0x3E); /* VCM control */ \
36-
ILI9341_CMD(0x36, (0x20 | 0x08)); /* Memory Access Control */ \
36+
ILI9341_CMD(0x36, 0x28); /* Memory Access Control (MV|BGR) */ \
3737
ILI9341_CMD(0x3A, 0x55); /* Pixel Format Set RGB565 */ \
3838
ILI9341_CMD(0xB1, 0x00, 0x1B); /* Frame Rate Control (1B=70, 1F=61, 10=119) */ \
3939
ILI9341_CMD(0xB6, 0x0A, 0xA2); /* Display Function Control */ \

components/retro-go/targets/odroid-go/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
ILI9341_CMD(0xC1, 0x12); /* Power control //SAP[2:0];BT[3:0] */ \
3535
ILI9341_CMD(0xC5, 0x32, 0x3C); /* VCM control */ \
3636
ILI9341_CMD(0xC7, 0x91); /* VCM control2 */ \
37-
ILI9341_CMD(0x36, (0x20 | 0x80 | 0x08)); /* Memory Access Control */ \
37+
ILI9341_CMD(0x36, 0xA8); /* Memory Access Control (MY|MV|BGR) */ \
3838
ILI9341_CMD(0xB1, 0x00, 0x10); /* Frame Rate Control (1B=70, 1F=61, 10=119) */ \
3939
ILI9341_CMD(0xB6, 0x0A, 0xA2); /* Display Function Control */ \
4040
ILI9341_CMD(0xF6, 0x01, 0x30); \

components/retro-go/targets/rachel-esp32/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
ILI9341_CMD(0xC1, 0x12); \
3939
ILI9341_CMD(0xC5, 0x32, 0x3C); \
4040
ILI9341_CMD(0xC7, 0x91); \
41-
ILI9341_CMD(0x36, (0xA0| 0X08)); /* 1.3 inch 0XA0|0X08 (2.4 inch 0x00|0x80) */ \
41+
ILI9341_CMD(0x36, 0xA8); /* 1.3 inch (MY|MV|BGR) / 2.4 inch (MY) */ \
4242
ILI9341_CMD(0xB1, 0x00, 0x10); \
4343
ILI9341_CMD(0xB6, 0x0A, 0xA2); \
4444
ILI9341_CMD(0xF6, 0x01, 0x30); \

components/retro-go/targets/retro-esp32/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
ILI9341_CMD(0xC1, 0x12); /* Power control //SAP[2:0];BT[3:0] */ \
3535
ILI9341_CMD(0xC5, 0x32, 0x3C); /* VCM control */ \
3636
ILI9341_CMD(0xC7, 0x91); /* VCM control2 */ \
37-
ILI9341_CMD(0x36, (0x40 | 0x80 | 0x08)); /* Memory Access Control */ \
37+
ILI9341_CMD(0x36, 0xC8); /* Memory Access Control (MY|MX|BGR) */ \
3838
ILI9341_CMD(0xB1, 0x00, 0x10); /* Frame Rate Control (1B=70, 1F=61, 10=119) */ \
3939
ILI9341_CMD(0xB6, 0x0A, 0xA2); /* Display Function Control */ \
4040
ILI9341_CMD(0xF6, 0x01, 0x30); \

components/retro-go/targets/retro-ruler-V1/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
ILI9341_CMD(0xC1, 0x12); /* Power control //SAP[2:0];BT[3:0] */ \
3535
ILI9341_CMD(0xC5, 0x32, 0x3C); /* VCM control */ \
3636
ILI9341_CMD(0xC7, 0x91); /* VCM control2 */ \
37-
ILI9341_CMD(0x36, (0x40 | 0x80 | 0x08)); /* Memory Access Control */ \
37+
ILI9341_CMD(0x36, 0xC8); /* Memory Access Control (MY|MX|BGR) */ \
3838
ILI9341_CMD(0xB1, 0x00, 0x10); /* Frame Rate Control (1B=70, 1F=61, 10=119) */ \
3939
ILI9341_CMD(0xB6, 0x0A, 0xA2); /* Display Function Control */ \
4040
ILI9341_CMD(0xF6, 0x01, 0x30); \

0 commit comments

Comments
 (0)