Skip to content

Commit

Permalink
LVGL: Updated BSPs and examples for new ESP LVGL Port (LVGL9)
Browse files Browse the repository at this point in the history
  • Loading branch information
espzav committed May 21, 2024
1 parent 0f4476a commit 81fa105
Show file tree
Hide file tree
Showing 127 changed files with 2,210 additions and 319 deletions.
2 changes: 1 addition & 1 deletion SquareLine/boards/esp32_c3_lcdkit/main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ targets:
- esp32c3
dependencies:
idf: ">=4.4"
esp32_c3_lcdkit: "*"
esp32_c3_lcdkit: "==1.0.1"
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ targets:
- esp32s2
dependencies:
idf: ">=4.4"
esp32_s2_kaluga_kit: "*"
esp32_s2_kaluga_kit: "==3.0.1"
2 changes: 1 addition & 1 deletion SquareLine/boards/esp32_s2_kaluga_kit/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ CONFIG_IDF_TARGET="esp32s2"
CONFIG_LV_COLOR_16_SWAP=y
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_MEMCPY_MEMSET_STD=y
CONFIG_LV_USE_PERF_MONITOR=y
CONFIG_LV_USE_PERF_MONITOR=y
2 changes: 1 addition & 1 deletion SquareLine/boards/esp32_s3_eye/main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ targets:
- esp32s3
dependencies:
idf: ">=4.4"
esp32_s3_eye: "*"
esp32_s3_eye: "==3.0.4"
2 changes: 1 addition & 1 deletion SquareLine/boards/esp32_s3_eye/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ CONFIG_IDF_TARGET="esp32s3"
CONFIG_LV_COLOR_16_SWAP=y
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_MEMCPY_MEMSET_STD=y
CONFIG_LV_USE_PERF_MONITOR=y
CONFIG_LV_USE_PERF_MONITOR=y
2 changes: 1 addition & 1 deletion SquareLine/boards/esp32_s3_korvo_2/main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ targets:
- esp32s3
dependencies:
idf: ">=4.4"
esp32_s3_korvo_2: "*"
esp32_s3_korvo_2: "==2.1.2"
2 changes: 1 addition & 1 deletion SquareLine/boards/esp32_s3_korvo_2/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ CONFIG_IDF_TARGET="esp32s3"
CONFIG_LV_COLOR_16_SWAP=y
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_MEMCPY_MEMSET_STD=y
CONFIG_LV_USE_PERF_MONITOR=y
CONFIG_LV_USE_PERF_MONITOR=y
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ description: ESP-BSP SquareLine LVGL Example
targets:
- esp32s3
dependencies:
esp32_s3_lcd_ev_board: "*"
esp32_s3_lcd_ev_board: "==2.1.0"
2 changes: 1 addition & 1 deletion SquareLine/boards/esp32_s3_usb_otg/main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ targets:
- esp32s3
dependencies:
idf: ">=4.4"
esp32_s3_usb_otg: "*"
esp32_s3_usb_otg: "==1.5.1"
2 changes: 1 addition & 1 deletion SquareLine/boards/esp32_s3_usb_otg/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ CONFIG_IDF_TARGET="esp32s3"
CONFIG_LV_COLOR_16_SWAP=y
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_MEMCPY_MEMSET_STD=y
CONFIG_LV_USE_PERF_MONITOR=y
CONFIG_LV_USE_PERF_MONITOR=y
2 changes: 1 addition & 1 deletion SquareLine/boards/espbox/main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ targets:
- esp32s3
dependencies:
idf: ">=4.4"
esp-box: "*"
esp-box: "==3.0.5"
2 changes: 1 addition & 1 deletion SquareLine/boards/espbox/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ CONFIG_IDF_TARGET="esp32s3"
CONFIG_LV_COLOR_16_SWAP=y
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_MEMCPY_MEMSET_STD=y
CONFIG_LV_USE_PERF_MONITOR=y
CONFIG_LV_USE_PERF_MONITOR=y
2 changes: 1 addition & 1 deletion SquareLine/boards/espbox_3/main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ targets:
- esp32s3
dependencies:
idf: ">=4.4"
esp-box-3: "*"
esp-box-3: "==1.1.3"
2 changes: 1 addition & 1 deletion SquareLine/boards/espbox_3/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ CONFIG_IDF_TARGET="esp32s3"
CONFIG_LV_COLOR_16_SWAP=y
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_MEMCPY_MEMSET_STD=y
CONFIG_LV_USE_PERF_MONITOR=y
CONFIG_LV_USE_PERF_MONITOR=y
2 changes: 1 addition & 1 deletion SquareLine/boards/espbox_lite/main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ targets:
- esp32s3
dependencies:
idf: ">=4.4"
esp-box-lite: "*"
esp-box-lite: "==2.0.4"
2 changes: 1 addition & 1 deletion SquareLine/boards/espbox_lite/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ CONFIG_IDF_TARGET="esp32s3"
CONFIG_LV_COLOR_16_SWAP=y
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_MEMCPY_MEMSET_STD=y
CONFIG_LV_USE_PERF_MONITOR=y
CONFIG_LV_USE_PERF_MONITOR=y
2 changes: 1 addition & 1 deletion SquareLine/boards/espwroverkit/main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ targets:
- esp32
dependencies:
idf: ">=4.4"
esp_wrover_kit: "^1.0.0"
esp_wrover_kit: "==1.5.1"
2 changes: 1 addition & 1 deletion SquareLine/boards/m5stack_core_s3/main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ targets:
- esp32s3
dependencies:
idf: ">=5.0"
m5stack_core_s3: "*"
m5stack_core_s3: "==1.0.0"
56 changes: 56 additions & 0 deletions bsp/esp-box-3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,59 @@ ESP32-S3-BOX-3 also uses a Type-C USB connector that provides 5 V of power input
| SDCARD |:heavy_check_mark:| idf |>=4.4.5|
| IMU |:heavy_check_mark:| [espressif/icm42670](https://components.espressif.com/components/espressif/icm42670) | ^1 |
<!-- Autogenerated end: Dependencies -->
<!-- Autogenerated start: Dependencies -->
### Capabilities and dependencies
| Capability | Available | Component |Version|
|-------------|------------------|----------------------------------------------------------------------------------------------------------|-------|
| DISPLAY |:heavy_check_mark:| [espressif/esp_lcd_ili9341](https://components.espressif.com/components/espressif/esp_lcd_ili9341) | ^1 |
| LVGL_PORT |:heavy_check_mark:| [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^2 |
| TOUCH |:heavy_check_mark:|[espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911)| ^1 |
| BUTTONS |:heavy_check_mark:| [espressif/button](https://components.espressif.com/components/espressif/button) | >=2.5 |
| AUDIO |:heavy_check_mark:| [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | ^1 |
|AUDIO_SPEAKER|:heavy_check_mark:| | |
| AUDIO_MIC |:heavy_check_mark:| | |
| SDCARD |:heavy_check_mark:| idf |>=4.4.5|
| IMU |:heavy_check_mark:| [espressif/icm42670](https://components.espressif.com/components/espressif/icm42670) | ^1 |
<!-- Autogenerated end: Dependencies -->
<!-- Autogenerated start: Dependencies -->
### Capabilities and dependencies
| Capability | Available | Component |Version|
|-------------|------------------|----------------------------------------------------------------------------------------------------------|-------|
| DISPLAY |:heavy_check_mark:| [espressif/esp_lcd_ili9341](https://components.espressif.com/components/espressif/esp_lcd_ili9341) | ^1 |
| LVGL_PORT |:heavy_check_mark:| [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^2 |
| TOUCH |:heavy_check_mark:|[espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911)| ^1 |
| BUTTONS |:heavy_check_mark:| [espressif/button](https://components.espressif.com/components/espressif/button) | >=2.5 |
| AUDIO |:heavy_check_mark:| [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | ^1 |
|AUDIO_SPEAKER|:heavy_check_mark:| | |
| AUDIO_MIC |:heavy_check_mark:| | |
| SDCARD |:heavy_check_mark:| idf |>=4.4.5|
| IMU |:heavy_check_mark:| [espressif/icm42670](https://components.espressif.com/components/espressif/icm42670) | ^1 |
<!-- Autogenerated end: Dependencies -->
<!-- Autogenerated start: Dependencies -->
### Capabilities and dependencies
| Capability | Available | Component |Version|
|-------------|------------------|----------------------------------------------------------------------------------------------------------|-------|
| DISPLAY |:heavy_check_mark:| [espressif/esp_lcd_ili9341](https://components.espressif.com/components/espressif/esp_lcd_ili9341) | ^1 |
| LVGL_PORT |:heavy_check_mark:| [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^2 |
| TOUCH |:heavy_check_mark:|[espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911)| ^1 |
| BUTTONS |:heavy_check_mark:| [espressif/button](https://components.espressif.com/components/espressif/button) | >=2.5 |
| AUDIO |:heavy_check_mark:| [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | ^1 |
|AUDIO_SPEAKER|:heavy_check_mark:| | |
| AUDIO_MIC |:heavy_check_mark:| | |
| SDCARD |:heavy_check_mark:| idf |>=4.4.5|
| IMU |:heavy_check_mark:| [espressif/icm42670](https://components.espressif.com/components/espressif/icm42670) | ^1 |
<!-- Autogenerated end: Dependencies -->
<!-- Autogenerated start: Dependencies -->
### Capabilities and dependencies
| Capability | Available | Component |Version|
|-------------|------------------|----------------------------------------------------------------------------------------------------------|-------|
| DISPLAY |:heavy_check_mark:| [espressif/esp_lcd_ili9341](https://components.espressif.com/components/espressif/esp_lcd_ili9341) | ^1 |
| LVGL_PORT |:heavy_check_mark:| [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^2 |
| TOUCH |:heavy_check_mark:|[espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911)| ^1 |
| BUTTONS |:heavy_check_mark:| [espressif/button](https://components.espressif.com/components/espressif/button) | >=2.5 |
| AUDIO |:heavy_check_mark:| [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | ^1 |
|AUDIO_SPEAKER|:heavy_check_mark:| | |
| AUDIO_MIC |:heavy_check_mark:| | |
| SDCARD |:heavy_check_mark:| idf |>=4.4.5|
| IMU |:heavy_check_mark:| [espressif/icm42670](https://components.espressif.com/components/espressif/icm42670) | ^1 |
<!-- Autogenerated end: Dependencies -->
15 changes: 9 additions & 6 deletions bsp/esp-box-3/esp-box-3.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static const ili9341_lcd_init_cmd_t vendor_specific_init[] = {
{0, (uint8_t []){0}, 0xff, 0},
};

static lv_disp_t *disp;
static lv_display_t *disp;
static lv_indev_t *disp_indev = NULL;
static esp_lcd_touch_handle_t tp; // LCD touch handle
static esp_lcd_panel_handle_t panel_handle = NULL;
Expand Down Expand Up @@ -424,7 +424,7 @@ esp_err_t bsp_display_new(const bsp_display_config_t *config, esp_lcd_panel_hand
return ret;
}

static lv_disp_t *bsp_display_lcd_init(const bsp_display_cfg_t *cfg)
static lv_display_t *bsp_display_lcd_init(const bsp_display_cfg_t *cfg)
{
assert(cfg != NULL);
esp_lcd_panel_io_handle_t io_handle = NULL;
Expand Down Expand Up @@ -454,6 +454,9 @@ static lv_disp_t *bsp_display_lcd_init(const bsp_display_cfg_t *cfg)
.flags = {
.buff_dma = cfg->flags.buff_dma,
.buff_spiram = cfg->flags.buff_spiram,
#if LVGL_VERSION_MAJOR >= 9
.swap_bytes = (BSP_LCD_BIGENDIAN ? true : false),
#endif
}
};

Expand Down Expand Up @@ -534,7 +537,7 @@ esp_err_t bsp_touch_new(const bsp_touch_config_t *config, esp_lcd_touch_handle_t
return ESP_OK;
}

static lv_indev_t *bsp_display_indev_init(lv_disp_t *disp)
static lv_indev_t *bsp_display_indev_init(lv_display_t *disp)
{
BSP_ERROR_CHECK_RETURN_NULL(bsp_touch_new(NULL, &tp));
assert(tp);
Expand All @@ -548,7 +551,7 @@ static lv_indev_t *bsp_display_indev_init(lv_disp_t *disp)
return lvgl_port_add_touch(&touch_cfg);
}

lv_disp_t *bsp_display_start(void)
lv_display_t *bsp_display_start(void)
{
bsp_display_cfg_t cfg = {
.lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG(),
Expand All @@ -566,7 +569,7 @@ lv_disp_t *bsp_display_start(void)
return bsp_display_start_with_config(&cfg);
}

lv_disp_t *bsp_display_start_with_config(const bsp_display_cfg_t *cfg)
lv_display_t *bsp_display_start_with_config(const bsp_display_cfg_t *cfg)
{
assert(cfg != NULL);
BSP_ERROR_CHECK_RETURN_NULL(lvgl_port_init(&cfg->lvgl_port_cfg));
Expand All @@ -585,7 +588,7 @@ lv_indev_t *bsp_display_get_input_dev(void)
return disp_indev;
}

void bsp_display_rotate(lv_disp_t *disp, lv_disp_rot_t rotation)
void bsp_display_rotate(lv_display_t *disp, lv_disp_rotation_t rotation)
{
lv_disp_set_rotation(disp, rotation);
}
Expand Down
3 changes: 1 addition & 2 deletions bsp/esp-box-3/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

version: "1.1.3"
version: "1.2.0"
description: Board Support Package (BSP) for ESP32-S3-BOX-3
url: https://github.com/espressif/esp-bsp/tree/master/bsp/esp-box-3

Expand All @@ -14,7 +14,6 @@ dependencies:
esp_lcd_touch_tt21100: "^1"
esp_lcd_touch_gt911: "^1"
esp_lcd_ili9341: "^1"
lvgl/lvgl: "^8"

espressif/esp_lvgl_port:
version: "^2"
Expand Down
6 changes: 3 additions & 3 deletions bsp/esp-box-3/include/bsp/esp-box-3.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ esp_err_t bsp_sdcard_unmount(void);
*
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start(void);
lv_display_t *bsp_display_start(void);

/**
* @brief Initialize display
Expand All @@ -363,7 +363,7 @@ lv_disp_t *bsp_display_start(void);
*
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start_with_config(const bsp_display_cfg_t *cfg);
lv_display_t *bsp_display_start_with_config(const bsp_display_cfg_t *cfg);

/**
* @brief Get pointer to input device (touch, buttons, ...)
Expand Down Expand Up @@ -419,7 +419,7 @@ esp_err_t bsp_display_exit_sleep(void);
* @param[in] disp Pointer to LVGL display
* @param[in] rotation Angle of the display rotation
*/
void bsp_display_rotate(lv_disp_t *disp, lv_disp_rot_t rotation);
void bsp_display_rotate(lv_display_t *disp, lv_disp_rotation_t rotation);
/**************************************************************************************************
*
* Button
Expand Down
Loading

0 comments on commit 81fa105

Please sign in to comment.