Skip to content

Commit 26e4fe7

Browse files
author
xutao
committed
example: fix expand chip exception
The i2c interface shared by camera and expand chip, which may cause abnormal operation of expandwq chip
1 parent 302f9a2 commit 26e4fe7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/display/lcd_camera/main/lcd_camera_main.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,15 @@ void app_main(void)
103103
{
104104
esp_periph_config_t periph_cfg = DEFAULT_ESP_PERIPH_SET_CONFIG();
105105
esp_periph_set_handle_t set = esp_periph_set_init(&periph_cfg);
106-
esp_lcd_panel_handle_t panel_handle = audio_board_lcd_init(set, NULL);
107106

107+
// Because the current development board camera shares the i2c interface with the expansion chip.
108+
// The expansion chip operation may be abnormal, so the camera is initialized in advance
108109
if (ESP_OK != init_camera()) {
109110
return;
110111
}
112+
113+
esp_lcd_panel_handle_t panel_handle = audio_board_lcd_init(set, NULL);
114+
111115
if (s_camera_format == PIXFORMAT_YUV422) {
112116
rgb_buffer = audio_calloc(1, EXAMPLE_LCD_H_RES * EXAMPLE_LCD_V_RES * 2);
113117
AUDIO_MEM_CHECK(TAG, rgb_buffer, return);

0 commit comments

Comments
 (0)