Skip to content

Commit

Permalink
lcd mirror conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
rzeldent committed Mar 9, 2024
1 parent 6d00b82 commit 165e049
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
; https://docs.platformio.org/page/projectconf.html

[platformio]
#default_envs = esp32-1732S019C
default_envs = esp32-1732S019C
#default_envs = esp32-1732S019N
#default_envs = esp32-2424S012C
#default_envs = esp32-2424S012N
Expand Down
3 changes: 0 additions & 3 deletions src/esp32_smartdisplay.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#include <esp32_smartdisplay.h>
#include <esp_arduino_version.h>
#include <esp_lcd_types.h>
#include <esp_lcd_panel_ops.h>

#ifdef BOARD_HAS_TOUCH
#include <esp_lcd_touch.h>
Expand Down
4 changes: 4 additions & 0 deletions src/lvgl_panel_gc9a01_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@ void lvgl_lcd_init(lv_disp_drv_t *drv)
// If LCD is IPS invert the colors
ESP_ERROR_CHECK(esp_lcd_panel_invert_color(panel_handle, true));
#endif
#ifdef LCD_SWAP_XY
ESP_ERROR_CHECK(esp_lcd_panel_swap_xy(panel_handle, LCD_SWAP_XY));
#endif
#if defined(LCD_MIRROR_X) || defined(LCD_MIRROR_Y)
ESP_ERROR_CHECK(esp_lcd_panel_mirror(panel_handle, LCD_MIRROR_X, LCD_MIRROR_Y));
#endif
#if defined(LCD_GAP_X) || defined(LCD_GAP_Y)
ESP_ERROR_CHECK(esp_lcd_panel_set_gap(panel_handle, LCD_GAP_X, LCD_GAP_Y));
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/lvgl_panel_ili9341_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,12 @@ void lvgl_lcd_init(lv_disp_drv_t *drv)
// If LCD is IPS invert the colors
ESP_ERROR_CHECK(esp_lcd_panel_invert_color(panel_handle, true));
#endif
#ifdef LCD_SWAP_XY
ESP_ERROR_CHECK(esp_lcd_panel_swap_xy(panel_handle, LCD_SWAP_XY));
#endif
#if defined(LCD_MIRROR_X) || defined(LCD_MIRROR_Y)
ESP_ERROR_CHECK(esp_lcd_panel_mirror(panel_handle, LCD_MIRROR_X, LCD_MIRROR_Y));
#endif
#if defined(LCD_GAP_X) || defined(LCD_GAP_Y)
ESP_ERROR_CHECK(esp_lcd_panel_set_gap(panel_handle, LCD_GAP_X, LCD_GAP_Y));
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/lvgl_panel_st7262_par.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@ void lvgl_lcd_init(lv_disp_drv_t *drv)
// If LCD is IPS invert the colors
ESP_ERROR_CHECK(esp_lcd_panel_invert_color(panel_handle, true));
#endif
#ifdef LCD_SWAP_XY
ESP_ERROR_CHECK(esp_lcd_panel_swap_xy(panel_handle, LCD_SWAP_XY));
#endif
#if defined(LCD_MIRROR_X) || defined(LCD_MIRROR_Y)
ESP_ERROR_CHECK(esp_lcd_panel_mirror(panel_handle, LCD_MIRROR_X, LCD_MIRROR_Y));
#endif
#if defined(LCD_GAP_X) || defined(LCD_GAP_Y)
ESP_ERROR_CHECK(esp_lcd_panel_set_gap(panel_handle, LCD_GAP_X, LCD_GAP_Y));
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/lvgl_panel_st7701_par.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ void lvgl_lcd_init(lv_disp_drv_t *drv)
// If LCD is IPS invert the colors
ESP_ERROR_CHECK(esp_lcd_panel_invert_color(panel_handle, true));
#endif
#ifdef LCD_SWAP_XY
ESP_ERROR_CHECK(esp_lcd_panel_swap_xy(panel_handle, LCD_SWAP_XY));
#endif
#if defined(LCD_MIRROR_X) || defined(LCD_MIRROR_Y)
ESP_ERROR_CHECK(esp_lcd_panel_mirror(panel_handle, LCD_MIRROR_X, LCD_MIRROR_Y));
#endif
#if defined(LCD_GAP_X) || defined(LCD_GAP_Y)
ESP_ERROR_CHECK(esp_lcd_panel_set_gap(panel_handle, LCD_GAP_X, LCD_GAP_Y));
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/lvgl_panel_st7789_i80.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,12 @@ void lvgl_lcd_init(lv_disp_drv_t *drv)
// If LCD is IPS invert the colors
ESP_ERROR_CHECK(esp_lcd_panel_invert_color(panel_handle, true));
#endif
#ifdef LCD_SWAP_XY
ESP_ERROR_CHECK(esp_lcd_panel_swap_xy(panel_handle, LCD_SWAP_XY));
#endif
#if defined(LCD_MIRROR_X) || defined(LCD_MIRROR_Y)
ESP_ERROR_CHECK(esp_lcd_panel_mirror(panel_handle, LCD_MIRROR_X, LCD_MIRROR_Y));
#endif
#if defined(LCD_GAP_X) || defined(LCD_GAP_Y)
ESP_ERROR_CHECK(esp_lcd_panel_set_gap(panel_handle, LCD_GAP_X, LCD_GAP_Y));
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/lvgl_panel_st7789_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,12 @@ void lvgl_lcd_init(lv_disp_drv_t *drv)
// If LCD is IPS invert the colors
ESP_ERROR_CHECK(esp_lcd_panel_invert_color(panel_handle, true));
#endif
#ifdef LCD_SWAP_XY
ESP_ERROR_CHECK(esp_lcd_panel_swap_xy(panel_handle, LCD_SWAP_XY));
#endif
#if defined(LCD_MIRROR_X) || defined(LCD_MIRROR_Y)
ESP_ERROR_CHECK(esp_lcd_panel_mirror(panel_handle, LCD_MIRROR_X, LCD_MIRROR_Y));
#endif
#if defined(LCD_GAP_X) || defined(LCD_GAP_Y)
ESP_ERROR_CHECK(esp_lcd_panel_set_gap(panel_handle, LCD_GAP_X, LCD_GAP_Y));
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/lvgl_panel_st7796_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,12 @@ void lvgl_lcd_init(lv_disp_drv_t *drv)
// If LCD is IPS invert the colors
ESP_ERROR_CHECK(esp_lcd_panel_invert_color(panel_handle, true));
#endif
#ifdef LCD_SWAP_XY
ESP_ERROR_CHECK(esp_lcd_panel_swap_xy(panel_handle, LCD_SWAP_XY));
#endif
#if defined(LCD_MIRROR_X) || defined(LCD_MIRROR_Y)
ESP_ERROR_CHECK(esp_lcd_panel_mirror(panel_handle, LCD_MIRROR_X, LCD_MIRROR_Y));
#endif
#if defined(LCD_GAP_X) || defined(LCD_GAP_Y)
ESP_ERROR_CHECK(esp_lcd_panel_set_gap(panel_handle, LCD_GAP_X, LCD_GAP_Y));
#endif
Expand Down

0 comments on commit 165e049

Please sign in to comment.