Skip to content

Commit c72c92e

Browse files
committed
Formatting
1 parent 2212baa commit c72c92e

File tree

17 files changed

+70
-98
lines changed

17 files changed

+70
-98
lines changed

components/retro-go/rg_display.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static void lcd_set_window(int left, int top, int width, int height);
3737
static inline uint16_t *lcd_get_buffer(size_t length);
3838
static inline void lcd_send_buffer(uint16_t *buffer, size_t length);
3939

40-
#if RG_SCREEN_DRIVER == 0 /* ILI9341 */
40+
#if RG_SCREEN_DRIVER == 0 /* ILI9341/ST7789 */
4141
#include "drivers/display/ili9341.h"
4242
#elif RG_SCREEN_DRIVER == 99
4343
#include "drivers/display/sdl2.h"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#define RG_AUDIO_USE_EXT_DAC 0 // 0 = Disable, 1 = Enable
1919

2020
// Video
21-
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341
21+
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341/ST7789
2222
#define RG_SCREEN_HOST SPI2_HOST
2323
#define RG_SCREEN_SPEED SPI_MASTER_FREQ_40M
2424
#define RG_SCREEN_BACKLIGHT 0

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#define RG_AUDIO_USE_EXT_DAC 1 // 0 = Disable, 1 = Enable
1515

1616
// Video
17-
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341
17+
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341/ST7789
1818
#define RG_SCREEN_HOST SPI2_HOST
1919
#define RG_SCREEN_SPEED SPI_MASTER_FREQ_40M // SPI_MASTER_FREQ_80M
2020
#define RG_SCREEN_BACKLIGHT 1
@@ -23,7 +23,7 @@
2323
#define RG_SCREEN_ROTATE 0
2424
#define RG_SCREEN_VISIBLE_AREA {0, 0, 0, 0}
2525
#define RG_SCREEN_SAFE_AREA {0, 0, 0, 0}
26-
#define RG_SCREEN_INIT() \
26+
#define RG_SCREEN_INIT() \
2727
ILI9341_CMD(0xCF, 0x00, 0xc3, 0x30); \
2828
ILI9341_CMD(0xED, 0x64, 0x03, 0x12, 0x81); \
2929
ILI9341_CMD(0xE8, 0x85, 0x00, 0x78); \
@@ -38,8 +38,8 @@
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); \
41-
ILI9341_CMD(0xF2, 0x00); /* 3Gamma Function Disable */ \
42-
ILI9341_CMD(0x26, 0x01); /* Gamma curve selected */ \
41+
ILI9341_CMD(0xF2, 0x00); /* 3Gamma Function Disable */ \
42+
ILI9341_CMD(0x26, 0x01); /* Gamma curve selected */ \
4343
ILI9341_CMD(0xE0, 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, 0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03, 0x0E, 0x09, 0x00); \
4444
ILI9341_CMD(0xE1, 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, 0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C, 0x31, 0x36, 0x0F);
4545

@@ -68,6 +68,7 @@
6868
#define RG_BATTERY_CALC_PERCENT(raw) (((raw) * 2.f - 3500.f) / (4200.f - 3500.f) * 100.f)
6969
#define RG_BATTERY_CALC_VOLTAGE(raw) ((raw) * 2.f * 0.001f)
7070

71+
7172
// Status LED
7273
#define RG_GPIO_LED GPIO_NUM_38
7374

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@
99
#define RG_STORAGE_SDMMC_SPEED SDMMC_FREQ_DEFAULT
1010
// #define RG_STORAGE_FLASH_PARTITION "vfs"
1111

12+
// GPIO Extender
13+
// #define RG_I2C_GPIO_DRIVER 0 // 1 = AW9523, 2 = PCF9539, 3 = MCP23017
14+
// #define RG_I2C_GPIO_ADDR 0x00
15+
1216
// Audio
1317
#define RG_AUDIO_USE_INT_DAC 0 // 0 = Disable, 1 = GPIO25, 2 = GPIO26, 3 = Both
1418
#define RG_AUDIO_USE_EXT_DAC 1 // 0 = Disable, 1 = Enable
1519

1620
// Video
17-
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341
21+
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341/ST7789
1822
#define RG_SCREEN_HOST SPI2_HOST
1923
#define RG_SCREEN_SPEED SPI_MASTER_FREQ_40M
2024
#define RG_SCREEN_BACKLIGHT 1
@@ -72,10 +76,6 @@
7276
#define RG_BATTERY_CALC_PERCENT(raw) (((raw) - 170) / 30.f * 100.f)
7377
#define RG_BATTERY_CALC_VOLTAGE(raw) ((raw) * 2.f * 0.001f)
7478

75-
// GPIO Extender
76-
// #define RG_I2C_GPIO_DRIVER 0 // 1 = AW9523, 2 = PCF9539, 3 = MCP23017
77-
// #define RG_I2C_GPIO_ADDR 0x00
78-
7979

8080
// Status LED
8181
#define RG_GPIO_LED GPIO_NUM_13 // Causes the "power" LED to blink on disk access.

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#define RG_AUDIO_USE_EXT_DAC 1 // 0 = Disable, 1 = Enable
1515

1616
// Video
17-
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341
17+
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341/ST7789
1818
#define RG_SCREEN_HOST SPI2_HOST
1919
#define RG_SCREEN_SPEED SPI_MASTER_FREQ_80M
2020
#define RG_SCREEN_BACKLIGHT 1
@@ -66,10 +66,6 @@
6666
#define RG_BATTERY_CALC_PERCENT(raw) (((raw) * 2.f - 3500.f) / (4200.f - 3500.f) * 100.f)
6767
#define RG_BATTERY_CALC_VOLTAGE(raw) ((raw) * 2.f * 0.001f)
6868

69-
// GPIO Extender
70-
// #define RG_I2C_GPIO_DRIVER 0 // 1 = AW9523, 2 = PCF9539, 3 = MCP23017
71-
// #define RG_I2C_GPIO_ADDR 0x00
72-
7369

7470
// Status LED
7571
#define RG_GPIO_LED GPIO_NUM_2

components/retro-go/targets/fri3d-2024/config.h

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,15 @@
2121
#define RG_AUDIO_USE_EXT_DAC 0 // 0 = Disable, 1 = Enable
2222

2323
// Video
24-
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341 but also works on ST7789 with below RG_SCREEN_INIT()
24+
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341/ST7789
2525
#define RG_SCREEN_HOST SPI2_HOST
2626
#define RG_SCREEN_SPEED SPI_MASTER_FREQ_40M
27+
#define RG_SCREEN_BACKLIGHT 0
2728
#define RG_SCREEN_WIDTH 296
2829
#define RG_SCREEN_HEIGHT 240
2930
#define RG_SCREEN_ROTATE 0
30-
#define RG_SCREEN_VISIBLE_AREA {0, 0, 0, 0}
31-
#define RG_SCREEN_SAFE_AREA {0, 0, 0, 0}
32-
33-
#define ST7789_MADCTL 0x36 // Memory Access Control
34-
#define ST7789_MADCTL_MV 0x20
35-
#define ST7789_MADCTL_RGB 0x00
36-
#define ST7789_MADCTL_BGR 0x08
37-
31+
#define RG_SCREEN_VISIBLE_AREA {0, 0, 0, 0} // Left, Top, Right, Bottom
32+
#define RG_SCREEN_SAFE_AREA {0, 0, 0, 0} // Left, Top, Right, Bottom
3833
#define RG_SCREEN_INIT() \
3934
ILI9341_CMD(0xCF, 0x00, 0xc3, 0x30); \
4035
ILI9341_CMD(0xED, 0x64, 0x03, 0x12, 0x81); \
@@ -46,11 +41,11 @@
4641
ILI9341_CMD(0xC1, 0x12); /* Power control //SAP[2:0];BT[3:0] */ \
4742
ILI9341_CMD(0xC5, 0x32, 0x3C); /* VCM control */ \
4843
ILI9341_CMD(0xC7, 0x91); /* VCM control2 */ \
49-
ILI9341_CMD(ST7789_MADCTL, (ST7789_MADCTL_MV | ST7789_MADCTL_BGR)); \
44+
ILI9341_CMD(0x36, 0x28); /* Memory Access Control (MV|BGR) */ \
5045
ILI9341_CMD(0xB1, 0x00, 0x10); /* Frame Rate Control (1B=70, 1F=61, 10=119) */ \
5146
ILI9341_CMD(0xB6, 0x0A, 0xA2); /* Display Function Control */ \
5247
ILI9341_CMD(0xF6, 0x01, 0x30); \
53-
ILI9341_CMD(0xF2, 0x00); /* 3Gamma Function Disable */ \
48+
ILI9341_CMD(0xF2, 0x00); /* 3Gamma Function Disable */ \
5449
ILI9341_CMD(0xE0, 0xD0, 0x00, 0x05, 0x0E, 0x15, 0x0D, 0x37, 0x43, 0x47, 0x09, 0x15, 0x12, 0x16, 0x19); \
5550
ILI9341_CMD(0xE1, 0xD0, 0x00, 0x05, 0x0D, 0x0C, 0x06, 0x2D, 0x44, 0x40, 0x0E, 0x1C, 0x18, 0x16, 0x19);
5651

components/retro-go/targets/mrgc-g32/config.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@
99
#define RG_STORAGE_SDMMC_SPEED SDMMC_FREQ_DEFAULT
1010
// #define RG_STORAGE_FLASH_PARTITION "vfs"
1111

12+
// GPIO Extender
13+
// #define RG_I2C_GPIO_DRIVER 0 // 1 = AW9523, 2 = PCF9539, 3 = MCP23017
14+
// #define RG_I2C_GPIO_ADDR 0x00
15+
1216
// Audio
1317
#define RG_AUDIO_USE_INT_DAC 0 // 0 = Disable, 1 = GPIO25, 2 = GPIO26, 3 = Both
1418
#define RG_AUDIO_USE_EXT_DAC 1 // 0 = Disable, 1 = Enable
1519

1620
// Video
17-
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341
21+
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341/ST7789
1822
#define RG_SCREEN_HOST SPI2_HOST
1923
#define RG_SCREEN_SPEED SPI_MASTER_FREQ_40M
2024
#define RG_SCREEN_BACKLIGHT 1
@@ -63,10 +67,6 @@
6367
#define RG_BATTERY_CALC_PERCENT(raw) (((raw) - 170) / 30.f * 100.f)
6468
#define RG_BATTERY_CALC_VOLTAGE(raw) (3 * (raw) * 3.3f / 256)
6569

66-
// GPIO Extender
67-
// #define RG_I2C_GPIO_DRIVER 0 // 1 = AW9523, 2 = PCF9539, 3 = MCP23017
68-
// #define RG_I2C_GPIO_ADDR 0x00
69-
7070

7171
// Status LED
7272
// #define RG_GPIO_LED GPIO_NUM_NC

components/retro-go/targets/mrgc-gbm/config.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@
99
#define RG_STORAGE_SDMMC_SPEED SDMMC_FREQ_DEFAULT
1010
// #define RG_STORAGE_FLASH_PARTITION "vfs"
1111

12+
// GPIO Extender
13+
// #define RG_I2C_GPIO_DRIVER 0 // 1 = AW9523, 2 = PCF9539, 3 = MCP23017
14+
// #define RG_I2C_GPIO_ADDR 0x00
15+
1216
// Audio
1317
#define RG_AUDIO_USE_INT_DAC 0 // 0 = Disable, 1 = GPIO25, 2 = GPIO26, 3 = Both
1418
#define RG_AUDIO_USE_EXT_DAC 1 // 0 = Disable, 1 = Enable
1519

1620
// Video
17-
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341
21+
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341/ST7789
1822
#define RG_SCREEN_HOST SPI2_HOST
1923
#define RG_SCREEN_SPEED SPI_MASTER_FREQ_40M
2024
#define RG_SCREEN_BACKLIGHT 1
@@ -64,10 +68,6 @@
6468
#define RG_BATTERY_CALC_PERCENT(raw) (((raw) - 170) / 30.f * 100.f)
6569
#define RG_BATTERY_CALC_VOLTAGE(raw) (128 * 3.3f / (raw))
6670

67-
// GPIO Extender
68-
// #define RG_I2C_GPIO_DRIVER 0 // 1 = AW9523, 2 = PCF9539, 3 = MCP23017
69-
// #define RG_I2C_GPIO_ADDR 0x00
70-
7171

7272
// Status LED (Does not seem to be mappable)
7373
// #define RG_GPIO_LED GPIO_NUM_13 // From OG Firmware

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

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,15 @@
1414
#define RG_AUDIO_USE_EXT_DAC 0 // 0 = Disable, 1 = Enable
1515

1616
// Video
17-
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341
17+
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341/ST7789
1818
#define RG_SCREEN_HOST SPI2_HOST
1919
#define RG_SCREEN_SPEED SPI_MASTER_FREQ_40M
2020
#define RG_SCREEN_BACKLIGHT 1
2121
#define RG_SCREEN_WIDTH 300
2222
#define RG_SCREEN_HEIGHT 240
2323
#define RG_SCREEN_ROTATE 0
24-
#define RG_SCREEN_VISIBLE_AREA {20, 0, 0, 0} // Left, Top, Right, Bottom
25-
#define RG_SCREEN_SAFE_AREA {20, 0, 20, 0} // Left, Top, Right, Bottom
26-
27-
#define ST7789_MADCTL 0x36 // Memory Access Control
28-
#define ST7789_MADCTL_MY 0x80
29-
#define ST7789_MADCTL_MX 0x40
30-
#define ST7789_MADCTL_MV 0x20
31-
#define ST7789_MADCTL_ML 0x10
32-
#define ST7789_MADCTL_RGB 0x00
33-
#define ST7789_MADCTL_BGR 0x08
34-
24+
#define RG_SCREEN_VISIBLE_AREA {20, 0, 0, 0} // Left, Top, Right, Bottom
25+
#define RG_SCREEN_SAFE_AREA {20, 0, 20, 0} // Left, Top, Right, Bottom
3526
#define RG_SCREEN_INIT() \
3627
ILI9341_CMD(0xCF, 0x00, 0xc3, 0x30); \
3728
ILI9341_CMD(0xED, 0x64, 0x03, 0x12, 0x81); \
@@ -43,11 +34,11 @@
4334
ILI9341_CMD(0xC1, 0x12); /* Power control //SAP[2:0];BT[3:0] */ \
4435
ILI9341_CMD(0xC5, 0x32, 0x3C); /* VCM control */ \
4536
ILI9341_CMD(0xC7, 0x91); /* VCM control2 */ \
46-
ILI9341_CMD(ST7789_MADCTL, (ST7789_MADCTL_BGR)); \
37+
ILI9341_CMD(0x36, 0x08); /* Memory Access Control (BGR) */ \
4738
ILI9341_CMD(0xB1, 0x00, 0x10); /* Frame Rate Control (1B=70, 1F=61, 10=119) */ \
4839
ILI9341_CMD(0xB6, 0x0A, 0xA2); /* Display Function Control */ \
4940
ILI9341_CMD(0xF6, 0x01, 0x30); \
50-
ILI9341_CMD(0xF2, 0x00); /* 3Gamma Function Disable */ \
41+
ILI9341_CMD(0xF2, 0x00); /* 3Gamma Function Disable */ \
5142
ILI9341_CMD(0xE0, 0xD0, 0x00, 0x05, 0x0E, 0x15, 0x0D, 0x37, 0x43, 0x47, 0x09, 0x15, 0x12, 0x16, 0x19); \
5243
ILI9341_CMD(0xE1, 0xD0, 0x00, 0x05, 0x0D, 0x0C, 0x06, 0x2D, 0x44, 0x40, 0x0E, 0x1C, 0x18, 0x16, 0x19); \
5344

@@ -76,6 +67,7 @@
7667
#define RG_BATTERY_CALC_PERCENT(raw) (((raw) * 2.f - 3150.f) / (4150.f - 3150.f) * 100.f)
7768
#define RG_BATTERY_CALC_VOLTAGE(raw) ((raw) * 2.f * 0.001f)
7869

70+
7971
// Status LED
8072
// #define RG_GPIO_LED GPIO_NUM_2
8173

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@
99
// #define RG_STORAGE_SDMMC_SPEED SDMMC_FREQ_DEFAULT
1010
// #define RG_STORAGE_FLASH_PARTITION "vfs"
1111

12+
// GPIO Extender
13+
// #define RG_I2C_GPIO_DRIVER 0 // 1 = AW9523, 2 = PCF9539, 3 = MCP23017
14+
// #define RG_I2C_GPIO_ADDR 0x00
15+
1216
// Audio
1317
#define RG_AUDIO_USE_INT_DAC 3 // 0 = Disable, 1 = GPIO25, 2 = GPIO26, 3 = Both
1418
#define RG_AUDIO_USE_EXT_DAC 1 // 0 = Disable, 1 = Enable
1519

1620
// Video
17-
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341
21+
#define RG_SCREEN_DRIVER 0 // 0 = ILI9341/ST7789
1822
#define RG_SCREEN_HOST SPI2_HOST
1923
#define RG_SCREEN_SPEED SPI_MASTER_FREQ_40M
2024
#define RG_SCREEN_BACKLIGHT 1
@@ -38,8 +42,8 @@
3842
ILI9341_CMD(0xB1, 0x00, 0x10); /* Frame Rate Control (1B=70, 1F=61, 10=119) */ \
3943
ILI9341_CMD(0xB6, 0x0A, 0xA2); /* Display Function Control */ \
4044
ILI9341_CMD(0xF6, 0x01, 0x30); \
41-
ILI9341_CMD(0xF2, 0x00); /* 3Gamma Function Disable */ \
42-
ILI9341_CMD(0x26, 0x01); /* Gamma curve selected */ \
45+
ILI9341_CMD(0xF2, 0x00); /* 3Gamma Function Disable */ \
46+
ILI9341_CMD(0x26, 0x01); /* Gamma curve selected */ \
4347
ILI9341_CMD(0xE0, 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, 0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03, 0x0E, 0x09, 0x00); \
4448
ILI9341_CMD(0xE1, 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, 0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C, 0x31, 0x36, 0x0F);
4549

@@ -67,10 +71,6 @@
6771
#define RG_BATTERY_CALC_PERCENT(raw) (((raw) * 2.f - 3500.f) / (4200.f - 3500.f) * 100.f)
6872
#define RG_BATTERY_CALC_VOLTAGE(raw) ((raw) * 2.f * 0.001f)
6973

70-
// GPIO Extender
71-
// #define RG_I2C_GPIO_DRIVER 0 // 1 = AW9523, 2 = PCF9539, 3 = MCP23017
72-
// #define RG_I2C_GPIO_ADDR 0x00
73-
7474

7575
// Status LED
7676
#define RG_GPIO_LED GPIO_NUM_2

0 commit comments

Comments
 (0)