40集 ESP32 S3开发板代码流程解读

40集 开发板代码流程解读

door_bell_test_all_code

app_main

–》 esp32_s3_adc_button
-------》button_press_down_cb
–》xTaskCreate(button_task
–》my_i2c_init GPIO17 18
–》app_lcd_run
------》app_lcd_init
------------》gpio_config GPIO45 BACKLIGHT
------------》spi_bus_initialize GPIO0 GPIO1
------------》esp_lcd_new_panel_io_spi
------------------》lcd_spi_pre_trans_cb
------------------》lcd_spi_post_trans_color_cb
------------------》spi_bus_add_device
------------------》panel_io_spi_register_event_callbacks
------------》esp_lcd_panel_reset
------------》esp_lcd_panel_init
------------》gpio_set_level(EXAMPLE_LCD_GPIO_BL GPIO45
------》app_touch_init
-----------》ESP_LCD_TOUCH_IO_I2C_GT911_CONFIG iix 0x5D 或者0x14
-----------》esp_lcd_new_panel_io_i2c iic0
-----------》esp_lcd_touch_new_i2c_gt911
----------------》esp_lcd_touch_gt911_read_data
----------------》esp_lcd_touch_gt911_get_xy
----------------》esp_lcd_touch_gt911_get_button_state

------》app_lvgl_init
-----------》lvgl_port_init
----------------》lv_init
----------------》lvgl_port_tick_init
----------------》xTaskCreate(lvgl_port_task
-----------》lvgl_port_add_disp
-----------》lvgl_port_add_touch

–》app_lcd_run
------》setup_ui(&guider_ui);
-----------》setup_scr_screen
----------------》events_init_screen
-----------------------》screen_imgbtn_1_event_handler
-------------------------------》xSemaphoreGive(cam_semaphore);
–》bsp_spiffs_mount
–》mount_sdcard
–》tca9554_init
--------》esp_io_expander_new_i2c_tca9554 0x38
--------》esp_io_expander_set_level(io_expander, IO_EXPANDER_PIN_NUM_0, 1); 0 1 7 HIGH
–》bsp_board_init
------》bsp_i2s_init I2S_NUM_1
------》bsp_codec_init
----------》bsp_codec_adc_init
---------------》es7210_open
---------------》es7210_enable
---------------》es7210_set_reg
---------------》es7210_get_reg 。。。
----------》bsp_codec_dac_init
---------------》es8311_codec_new
---------------》es8311_open
---------------》es8311_enable
---------------》es8311_set_reg 。。。

–》du_sr_speech
result_que event_group cmd_list
------》fopen(/sdcard/rec3.pcm
------》esp_srmodel_init
----------》esp_partition_find_first
----------》srmodel_mmap_init
------》 xTaskCreatePinnedToCore(&detect_Task,
------》xTaskCreatePinnedToCore(&feed_Task,

–》xTaskCreate(Cam_Task,
------》cam_semaphore
------》init_camera();
----------》esp_camera_init
---------------》camera_probe
---------------》cam_config -》ll_cam_vsync_isr 注册了中断
---------------》cam_start

注:不同的板子有不同。
C3板子的TP是
ESP_LOGI(TAG, “Initialize touch controller FT6336”);
ESP_ERROR_CHECK(esp_lcd_touch_new_i2c_ft5x06(tp_io_handle, &tp_cfg, &tp));
这里需要修改。

猜你喜欢

转载自blog.csdn.net/phlr5/article/details/142057563