Skip to content

Commit

Permalink
Merge branch 'fix/esp_bsp_update' into 'master'
Browse files Browse the repository at this point in the history
esp-box: update bsp_display_start

See merge request ae_group/esp-box!104
  • Loading branch information
espressif2022 committed Mar 1, 2024
2 parents ee2160d + e0ca3fa commit 9b28a35
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 16 deletions.
13 changes: 11 additions & 2 deletions examples/chatgpt_demo/factory_nvs/main/main.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
/* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -114,7 +114,16 @@ void app_main(void)
ESP_ERROR_CHECK(esp_tinyuf2_install(NULL, &nvs_config));

bsp_i2c_init();
bsp_display_start();

bsp_display_cfg_t cfg = {
.lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG(),
.buffer_size = BSP_LCD_H_RES * CONFIG_BSP_LCD_DRAW_BUF_HEIGHT,
.double_buffer = 0,
.flags = {
.buff_dma = true,
}
};
bsp_display_start_with_config(&cfg);
bsp_display_backlight_on();
ui_init();

Expand Down
13 changes: 11 additions & 2 deletions examples/chatgpt_demo/main/main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: CC0-1.0
*/
Expand Down Expand Up @@ -203,7 +203,16 @@ void app_main()

bsp_spiffs_mount();
bsp_i2c_init();
bsp_display_start();

bsp_display_cfg_t cfg = {
.lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG(),
.buffer_size = BSP_LCD_H_RES * CONFIG_BSP_LCD_DRAW_BUF_HEIGHT,
.double_buffer = 0,
.flags = {
.buff_dma = true,
}
};
bsp_display_start_with_config(&cfg);
bsp_board_init();

ESP_LOGI(TAG, "Display LVGL demo");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ void app_main(void)
bsp_i2c_init();

/* Initialize display and LVGL */
bsp_display_start();
bsp_display_cfg_t cfg = {
.lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG(),
.buffer_size = BSP_LCD_H_RES * CONFIG_BSP_LCD_DRAW_BUF_HEIGHT,
.double_buffer = 0,
.flags = {
.buff_dma = true,
}
};
bsp_display_start_with_config(&cfg);

/* Set default display brightness */
bsp_display_brightness_set(APP_DISP_DEFAULT_BRIGHTNESS);
Expand Down
9 changes: 7 additions & 2 deletions examples/factory_demo/main/main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
Expand Down Expand Up @@ -108,7 +108,12 @@ void app_main(void)
bsp_i2c_init();

bsp_display_cfg_t cfg = {
.lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG()
.lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG(),
.buffer_size = BSP_LCD_H_RES * CONFIG_BSP_LCD_DRAW_BUF_HEIGHT,
.double_buffer = 0,
.flags = {
.buff_dma = true,
}
};
cfg.lvgl_port_cfg.task_affinity = 1;
bsp_display_start_with_config(&cfg);
Expand Down
12 changes: 10 additions & 2 deletions examples/image_display/main/image_display.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: CC0-1.0
*/
Expand All @@ -21,7 +21,15 @@ void app_main(void)
bsp_i2c_init();

/* Initialize display and LVGL */
bsp_display_start();
bsp_display_cfg_t cfg = {
.lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG(),
.buffer_size = BSP_LCD_H_RES * CONFIG_BSP_LCD_DRAW_BUF_HEIGHT,
.double_buffer = 0,
.flags = {
.buff_dma = true,
}
};
bsp_display_start_with_config(&cfg);

/* Set display brightness to 100% */
bsp_display_backlight_on();
Expand Down
12 changes: 10 additions & 2 deletions examples/lv_demos/main/lv_demos.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
Expand All @@ -13,7 +13,15 @@ void app_main(void)
/* Initialize I2C (for touch and audio) */
bsp_i2c_init();
/* Initialize display and LVGL */
bsp_display_start();
bsp_display_cfg_t cfg = {
.lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG(),
.buffer_size = BSP_LCD_H_RES * CONFIG_BSP_LCD_DRAW_BUF_HEIGHT,
.double_buffer = 0,
.flags = {
.buff_dma = true,
}
};
bsp_display_start_with_config(&cfg);

/* Set display brightness to 100% */
bsp_display_backlight_on();
Expand Down
7 changes: 6 additions & 1 deletion examples/matter_switch/main/box_main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
Expand Down Expand Up @@ -112,6 +112,11 @@ void box_main(void)
.task_affinity = -1, \
.task_max_sleep_ms = 500, \
.timer_period_ms = 5, \
},
.buffer_size = BSP_LCD_H_RES * CONFIG_BSP_LCD_DRAW_BUF_HEIGHT,
.double_buffer = 0,
.flags = {
.buff_dma = true,
}
};
bsp_display_start_with_config(&cfg);
Expand Down
12 changes: 10 additions & 2 deletions examples/mp3_demo/main/mp3_demo.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: CC0-1.0
*/
Expand Down Expand Up @@ -34,7 +34,15 @@ void app_main(void)
bsp_i2c_init();

/* Initialize display and LVGL */
bsp_display_start();
bsp_display_cfg_t cfg = {
.lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG(),
.buffer_size = BSP_LCD_H_RES * CONFIG_BSP_LCD_DRAW_BUF_HEIGHT,
.double_buffer = 0,
.flags = {
.buff_dma = true,
}
};
bsp_display_start_with_config(&cfg);

/* Set display brightness to 100% */
bsp_display_backlight_on();
Expand Down
13 changes: 11 additions & 2 deletions examples/watering_demo/main/main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
Expand Down Expand Up @@ -82,7 +82,16 @@ void app_main(void)
ESP_ERROR_CHECK(app_humidity_init());

bsp_i2c_init();
bsp_display_start();

bsp_display_cfg_t cfg = {
.lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG(),
.buffer_size = BSP_LCD_H_RES * CONFIG_BSP_LCD_DRAW_BUF_HEIGHT,
.double_buffer = 0,
.flags = {
.buff_dma = true,
}
};
bsp_display_start_with_config(&cfg);
bsp_board_init();
ESP_ERROR_CHECK(bsp_spiffs_mount());

Expand Down
1 change: 1 addition & 0 deletions tools/build_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
r'warning: unknown kconfig symbol \'BTDM_CTRL_MODE_BLE_ONLY\' assigned to*',
r'warning: unknown kconfig symbol \'IO_GLITCH_FILTER_TIME_MS\' assigned to*',
r'warning: unknown kconfig symbol \'BSP_TOUCH_BUTTON\' assigned to*',
r'warning: default value 0 on ESPNOW_OTA_SEND_FORWARD_TTL',
]

def _get_idf_version():
Expand Down

0 comments on commit 9b28a35

Please sign in to comment.