Skip to content

Commit

Permalink
retro-go: Added back support for LCD reset pin #99
Browse files Browse the repository at this point in the history
  • Loading branch information
ducalex committed Feb 1, 2024
1 parent 3ae5f46 commit 0d92ba2
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/retro-go/rg_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,14 @@ static void lcd_init(void)
gpio_set_direction(RG_GPIO_LCD_DC, GPIO_MODE_OUTPUT);
gpio_set_level(RG_GPIO_LCD_DC, 1);

#if defined(RG_GPIO_LCD_RST)
gpio_set_direction(RG_GPIO_LCD_RST, GPIO_MODE_OUTPUT);
gpio_set_level(RG_GPIO_LCD_RST, 0);
usleep(100 * 1000);
gpio_set_level(RG_GPIO_LCD_RST, 1);
usleep(10 * 1000);
#endif

ILI9341_CMD(0x01); // Reset
usleep(5 * 1000); // Wait 5ms after reset
ILI9341_CMD(0x3A, 0X05); // Pixel Format Set RGB565
Expand Down
1 change: 1 addition & 0 deletions components/retro-go/targets/esplay-micro/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
#define RG_GPIO_LCD_CS GPIO_NUM_5
#define RG_GPIO_LCD_DC GPIO_NUM_12
#define RG_GPIO_LCD_BCKL GPIO_NUM_27
// #define RG_GPIO_LCD_RST GPIO_NUM_NC

// External I2S DAC
#define RG_GPIO_SND_I2S_BCK GPIO_NUM_26
Expand Down
1 change: 1 addition & 0 deletions components/retro-go/targets/esplay-s3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
#define RG_GPIO_LCD_CS GPIO_NUM_8
#define RG_GPIO_LCD_DC GPIO_NUM_47
#define RG_GPIO_LCD_BCKL GPIO_NUM_39
#define RG_GPIO_LCD_RST GPIO_NUM_3

// SPI SD Card
#define RG_GPIO_SDSPI_CMD GPIO_NUM_14
Expand Down
1 change: 1 addition & 0 deletions components/retro-go/targets/mrgc-g32/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
#define RG_GPIO_LCD_CS GPIO_NUM_5
#define RG_GPIO_LCD_DC GPIO_NUM_12
#define RG_GPIO_LCD_BCKL GPIO_NUM_27
// #define RG_GPIO_LCD_RST GPIO_NUM_NC

// External I2S DAC
#define RG_GPIO_SND_I2S_BCK GPIO_NUM_26
Expand Down
1 change: 1 addition & 0 deletions components/retro-go/targets/mrgc-gbm/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
#define RG_GPIO_LCD_CS GPIO_NUM_5
#define RG_GPIO_LCD_DC GPIO_NUM_12
#define RG_GPIO_LCD_BCKL GPIO_NUM_27
// #define RG_GPIO_LCD_RST GPIO_NUM_NC

// External I2S DAC
#define RG_GPIO_SND_I2S_BCK GPIO_NUM_26
Expand Down
1 change: 1 addition & 0 deletions components/retro-go/targets/odroid-go/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
#define RG_GPIO_LCD_CS GPIO_NUM_5
#define RG_GPIO_LCD_DC GPIO_NUM_21
#define RG_GPIO_LCD_BCKL GPIO_NUM_14
// #define RG_GPIO_LCD_RST GPIO_NUM_NC

// SPI SD Card
#define RG_GPIO_SDSPI_MISO GPIO_NUM_19
Expand Down
1 change: 1 addition & 0 deletions components/retro-go/targets/qtpy-gamer/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
#define RG_GPIO_LCD_CS GPIO_NUM_27
#define RG_GPIO_LCD_DC GPIO_NUM_7
// #define RG_GPIO_LCD_BCKL GPIO_NUM_5 // not used!
// #define RG_GPIO_LCD_RST GPIO_NUM_NC

// SPI SD Card
#define RG_GPIO_SDSPI_MISO GPIO_NUM_12
Expand Down
1 change: 1 addition & 0 deletions components/retro-go/targets/retro-esp32/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
#define RG_GPIO_LCD_CS GPIO_NUM_5
#define RG_GPIO_LCD_DC GPIO_NUM_21
#define RG_GPIO_LCD_BCKL GPIO_NUM_14
// #define RG_GPIO_LCD_RST GPIO_NUM_NC

// SPI SD Card
#define RG_GPIO_SDSPI_MISO GPIO_NUM_19
Expand Down

0 comments on commit 0d92ba2

Please sign in to comment.