Skip to content

Commit fea7975

Browse files
committed
BSP offset
1 parent a9620d5 commit fea7975

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

bsp/esp32_s3_usb_otg/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.6.2"
1+
version: "1.6.3"
22
description: Board Support Package (BSP) for ESP32-S3-USB-OTG
33
url: https://github.com/espressif/esp-bsp/tree/master/bsp/esp32_s3_usb_otg
44

bsp/esp_bsp_generic/Kconfig

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,25 @@ menu "Board Support Package (generic)"
700700
default 240
701701
help
702702
The height in pixels of the display.
703-
703+
704+
config BSP_DISPLAY_HORIZONTAL_OFFSET
705+
depends on BSP_DISPLAY_ENABLED
706+
int
707+
prompt "Display horizontal offset"
708+
default 0
709+
help
710+
Some displays has offset. First columns and rows are not visible on screen
711+
(specific connection layout between screen and controler).
712+
713+
config BSP_DISPLAY_VERTICAL_OFFSET
714+
depends on BSP_DISPLAY_ENABLED
715+
int
716+
prompt "Display vertical offset"
717+
default 0
718+
help
719+
Some displays has offset. First columns and rows are not visible on screen
720+
(specific connection layout between screen and controler).
721+
704722
config BSP_DISPLAY_BRIGHTNESS_LEDC_CH
705723
depends on BSP_DISPLAY_ENABLED && BSP_DISPLAY_BACKLIGHT_GPIO != -1
706724
int "LEDC channel index for brightness control"

bsp/esp_bsp_generic/include/bsp/display.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
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
4244
extern "C" {

bsp/esp_bsp_generic/src/esp_bsp_generic.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,9 @@ static lv_display_t *bsp_display_lcd_init(void)
616616
#endif
617617
}
618618
};
619-
619+
#if BSP_LCD_H_OFFSET || BSP_LCD_V_OFFSET
620+
esp_lcd_panel_set_gap(panel_handle, (BSP_LCD_H_OFFSET), (BSP_LCD_V_OFFSET));
621+
#endif
620622
return lvgl_port_add_disp(&disp_cfg);
621623
}
622624

0 commit comments

Comments
 (0)