File tree Expand file tree Collapse file tree 4 files changed +25
-3
lines changed Expand file tree Collapse file tree 4 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -706,7 +706,25 @@ menu "Board Support Package (generic)"
706706 default 240
707707 help
708708 The height in pixels of the display.
709-
709+
710+ config BSP_DISPLAY_HORIZONTAL_OFFSET
711+ depends on BSP_DISPLAY_ENABLED
712+ int
713+ prompt "Display horizontal offset"
714+ default 0
715+ help
716+ Some displays has offset. First columns and rows are not visible on screen
717+ (specific connection layout between screen and controler).
718+
719+ config BSP_DISPLAY_VERTICAL_OFFSET
720+ depends on BSP_DISPLAY_ENABLED
721+ int
722+ prompt "Display vertical offset"
723+ default 0
724+ help
725+ Some displays has offset. First columns and rows are not visible on screen
726+ (specific connection layout between screen and controler).
727+
710728 config BSP_DISPLAY_BRIGHTNESS_LEDC_CH
711729 depends on BSP_DISPLAY_ENABLED && BSP_DISPLAY_BACKLIGHT_GPIO != -1
712730 int "LEDC channel index for brightness control"
Original file line number Diff line number Diff line change 11
2- version : " 2.0.0 "
2+ version : " 2.0.1 "
33description : Generic Board Support Package (BSP)
44url : https://github.com/espressif/esp-bsp/tree/master/bsp/esp_bsp_generic
55
Original file line number Diff line number Diff line change 3737/* Display definition */
3838#define BSP_LCD_H_RES (CONFIG_BSP_DISPLAY_WIDTH)
3939#define BSP_LCD_V_RES (CONFIG_BSP_DISPLAY_HEIGHT)
40+ #define BSP_LCD_H_OFFSET (CONFIG_BSP_DISPLAY_HORIZONTAL_OFFSET)
41+ #define BSP_LCD_V_OFFSET (CONFIG_BSP_DISPLAY_VERTICAL_OFFSET)
4042
4143#ifdef __cplusplus
4244extern "C" {
Original file line number Diff line number Diff line change @@ -619,7 +619,9 @@ static lv_display_t *bsp_display_lcd_init(void)
619619#endif
620620 }
621621 };
622-
622+ #if BSP_LCD_H_OFFSET || BSP_LCD_V_OFFSET
623+ esp_lcd_panel_set_gap (panel_handle , (BSP_LCD_H_OFFSET ), (BSP_LCD_V_OFFSET ));
624+ #endif
623625 return lvgl_port_add_disp (& disp_cfg );
624626}
625627
You can’t perform that action at this time.
0 commit comments