#include "esp_system.h"
#if ((ESP_IDF_VERSION_MAJOR < 4) || ((ESP_IDF_VERSION_MAJOR == 4) && (ESP_IDF_VERSION_MINOR < 3)) || ((ESP_IDF_VERSION_MAJOR == 4) && (ESP_IDF_VERSION_MINOR == 3) && (ESP_IDF_VERSION_PATCH < 2)))
#error Only ESP-IDF versions >= V4.3.2 are currently supported; if you are using the PIO build (the default one), wipe out your `.embuild` folder and try again with a clean rebuild
#endif
#include "esp_rom_crc.h"
#include "esp_log.h"
#include "esp_debug_helpers.h"
#include "esp_sleep.h"
#include "esp_task.h"
#include "esp_task_wdt.h"
#if ESP_IDF_VERSION_MAJOR < 6
#include "esp_interface.h"
#endif
#include "esp_ipc.h"
#include "esp_mac.h"
#include "esp_freertos_hooks.h"
#include "freertos/FreeRTOS.h"
#include "freertos/atomic.h"
#include "freertos/event_groups.h"
#include "freertos/list.h"
#include "freertos/message_buffer.h"
#include "freertos/queue.h"
#include "freertos/semphr.h"
#include "freertos/stream_buffer.h"
#include "freertos/task.h"
#include "freertos/task_snapshot.h"
#include "freertos/timers.h"
#if CONFIG_IDF_TARGET_ESP32
#if ESP_IDF_VERSION_MAJOR == 4
#include "esp32/himem.h"
#else
#ifdef ESP_IDF_COMP_ESP_PSRAM_ENABLED
#include "esp32/himem.h"
#endif #endif #endif
#if ESP_IDF_VERSION_MAJOR == 4
#include "esp_spiram.h"
#else
#ifdef ESP_IDF_COMP_ESP_PSRAM_ENABLED
#include "esp_psram.h"
#endif #endif
#if ESP_IDF_VERSION_MAJOR == 4
#include "esp_int_wdt.h"
#else
#include "esp_private/esp_int_wdt.h"
#endif
#ifdef ESP_IDF_COMP_CONSOLE_ENABLED
#include "esp_console.h"
#include "linenoise/linenoise.h"
#include "argtable3/argtable3.h"
#endif
#ifdef ESP_IDF_COMP_EFUSE_ENABLED
#include "esp_efuse.h"
#include "esp_efuse_table.h"
#endif
#ifdef ESP_IDF_COMP_ESP_PM_ENABLED
#include "esp_pm.h"
#endif
#ifdef ESP_IDF_COMP_ESP_TIMER_ENABLED
#include "esp_timer.h"
#endif
#if ESP_IDF_VERSION_MAJOR > 4
#ifdef ESP_IDF_COMP_SPI_FLASH_ENABLED
#include "esp_flash.h"
#if ESP_IDF_VERSION_MAJOR > 5
#include "spi_flash_mmap.h"
#else
#include "esp_spi_flash.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ESP_PARTITION
#include "esp_partition.h"
#endif
#else
#ifdef ESP_IDF_COMP_SPI_FLASH_ENABLED
#include "esp_spi_flash.h"
#include "esp_partition.h"
#endif
#endif
#if defined(ESP_IDF_COMP_ESP_ADC_CAL_ENABLED) || defined(ESP_IDF_COMP_ESP_ADC_ENABLED)
#if ESP_IDF_VERSION_MAJOR < 6
#include "esp_adc_cal.h"
#endif
#if ESP_IDF_VERSION_MAJOR > 4
#include "esp_adc/adc_cali.h"
#include "esp_adc/adc_cali_scheme.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ESP_EVENT_ENABLED
#include "esp_event.h"
#endif
#ifdef ESP_IDF_COMP_ESP_NETIF_ENABLED
#include "esp_netif.h"
#if ESP_IDF_VERSION_MAJOR > 4
#include "esp_netif_net_stack.h"
#endif
#if ESP_IDF_VERSION_MAJOR > 4 && defined(CONFIG_ESP_NETIF_TCPIP_LWIP) && defined(CONFIG_ESP_NETIF_BRIDGE_EN)
#include "esp_netif_br_glue.h"
#endif
#ifdef CONFIG_LWIP_PPP_SUPPORT
#include "esp_netif_ppp.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ESP_WIFI_ENABLED
#include "esp_wifi.h"
#ifdef ESP_IDF_COMP_ESP_NETIF_ENABLED
#include "esp_wifi_netif.h"
#endif
#include "esp_now.h"
#include "esp_mesh.h"
#if ESP_IDF_VERSION_MAJOR > 5
#include "esp_eap_client.h"
#else
#include "esp_wpa2.h"
#endif
#if (ESP_IDF_VERSION_MAJOR < 5 || ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR < 1)
#include "esp_coexist.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ESP_WIFI_REMOTE_ENABLED
#include "esp_wifi_remote.h"
#endif
#ifdef ESP_IDF_COMP_ESP_HOSTED_ENABLED
#include "esp_hosted.h"
#endif
#if defined(ESP_IDF_COMP_ESP_COEX_ENABLED) && (ESP_IDF_VERSION_MAJOR > 5 || ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR >= 1)
#include "esp_coexist.h"
#ifdef CONFIG_SOC_IEEE802154_SUPPORTED
#include "esp_coex_i154.h"
#endif
#endif
#ifdef ESP_IDF_COMP_WPA_SUPPLICANT_ENABLED
#if defined(CONFIG_ESP_WIFI_DPP_SUPPORT) || defined(CONFIG_WPA_DPP_SUPPORT)
#include "esp_dpp.h"
#endif
#if defined(CONFIG_ESP_WIFI_MBO_SUPPORT) || defined(CONFIG_WPA_MBO_SUPPORT)
#include "esp_mbo.h"
#endif
#include "esp_rrm.h"
#include "esp_wnm.h"
#include "esp_wpa.h"
#if ESP_IDF_VERSION_MAJOR > 5
#include "esp_eap_client.h"
#else
#include "esp_wpa2.h"
#endif
#include "esp_wps.h"
#if ESP_IDF_VERSION_MAJOR > 5 || ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR >= 1
#include "esp_supplicant_utils.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ESP_ETH_ENABLED
#include "esp_eth.h"
#ifdef ESP_IDF_COMP_ESP_NETIF_ENABLED
#include "esp_eth_netif_glue.h"
#endif
#endif
#ifdef ESP_IDF_COMP_OPENTHREAD_ENABLED
#ifdef CONFIG_OPENTHREAD_ENABLED
#include "esp_openthread.h"
#include "esp_openthread_border_router.h"
#include "esp_openthread_cli.h"
#if (ESP_IDF_VERSION_MAJOR > 4)
#include "esp_openthread_dns64.h"
#endif
#include "esp_openthread_lock.h"
#include "esp_openthread_netif_glue.h"
#include "esp_openthread_types.h"
#include "openthread/dataset.h"
#include "openthread/instance.h"
#include "openthread/ip6.h"
#include "openthread/joiner.h"
#include "openthread/link.h"
#include "openthread/logging.h"
#include "openthread/message.h"
#if (ESP_IDF_VERSION_MAJOR > 4)
#include "openthread/nat64.h"
#endif
#include "openthread/netdata.h"
#include "openthread/thread.h"
#include "openthread/srp_client_buffers.h"
#include "openthread/srp_client.h"
#include "openthread/platform/settings.h"
#endif
#endif
#ifdef ESP_IDF_COMP_VFS_ENABLED
#include "esp_vfs.h"
#include "esp_vfs_cdcacm.h"
#include "esp_vfs_dev.h"
#include "esp_vfs_semihost.h"
#ifdef SOC_USB_SERIAL_JTAG_SUPPORTED
#if ESP_IDF_VERSION_MAJOR > 5
#include "driver/usb_serial_jtag_vfs.h"
#else
#include "esp_vfs_usb_serial_jtag.h"
#endif
#endif
#ifdef ESP_IDF_COMP_VFS_CONSOLE_ENABLED
#if ((ESP_IDF_VERSION_MAJOR > 4) || ((ESP_IDF_VERSION_MAJOR == 4) && (ESP_IDF_VERSION_MINOR >= 4)))
#include "esp_vfs_console.h"
#endif
#endif
#if ((ESP_IDF_VERSION_MAJOR > 4) || ((ESP_IDF_VERSION_MAJOR == 4) && (ESP_IDF_VERSION_MINOR >= 4)))
#include "esp_vfs_eventfd.h"
#endif
#ifdef ESP_IDF_COMP_SPIFFS_ENABLED
#include "esp_spiffs.h"
#endif
#ifdef ESP_IDF_COMP_FATFS_ENABLED
#ifdef ESP_IDF_COMP_VFS_ENABLED
#include "esp_vfs_fat.h"
#endif
#include "diskio_impl.h"
#include "diskio_rawflash.h"
#include "diskio_sdmmc.h"
#include "diskio_wl.h"
#endif
#if defined(ESP_IDF_COMP_JOLTWALLET__LITTLEFS_ENABLED)
#include "esp_littlefs.h"
#endif
#endif
#ifdef ESP_IDF_COMP_LWIP_ENABLED
#include "lwip/dns.h"
#include "lwip/lwip_napt.h"
#include "lwip/netdb.h"
#include "lwip/sockets.h"
#if ESP_IDF_VERSION_MAJOR > 4
#include "lwip/esp_netif_net_stack.h"
#endif
#include "esp_sntp.h"
#include "ping/ping_sock.h"
#if ESP_IDF_VERSION_MAJOR > 5 || ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR >= 1
#ifdef ESP_IDF_COMP_ESP_NETIF_ENABLED
#include "esp_netif_sntp.h"
#endif
#endif
#endif
#ifdef ESP_IDF_COMP_MBEDTLS_ENABLED
#include "mbedtls/ssl.h"
#include "mbedtls/aes.h"
#include "mbedtls/cipher.h"
#include "mbedtls/entropy.h"
#include "mbedtls/ctr_drbg.h"
#include "mbedtls/cmac.h"
#include "mbedtls/ecdh.h"
#include "mbedtls/ecp.h"
#include "mbedtls/debug.h"
#ifdef CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
#include "esp_crt_bundle.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ESP_TLS_ENABLED
#ifdef CONFIG_ESP_TLS_USING_MBEDTLS
#include "mbedtls/ssl.h"
#elif CONFIG_ESP_TLS_USING_WOLFSSL
#include "wolfssl/wolfcrypt/settings.h"
#include "wolfssl/ssl.h"
#endif
#include "esp_tls.h"
#endif
#ifdef ESP_IDF_COMP_BOOTLOADER_SUPPORT_ENABLED
#include "bootloader_common.h"
#include "bootloader_random.h"
#endif
#ifdef ESP_IDF_COMP_APP_UPDATE_ENABLED
#include "esp_ota_ops.h"
#endif
#ifdef ESP_IDF_COMP_ESP_HTTPS_OTA_ENABLED
#include "esp_https_ota.h"
#endif
#ifdef ESP_IDF_COMP_ESP_HTTP_CLIENT_ENABLED
#include "esp_http_client.h"
#endif
#ifdef ESP_IDF_COMP_TCP_TRANSPORT_ENABLED
#include "esp_transport.h"
#include "esp_transport_ssl.h"
#include "esp_transport_tcp.h"
#ifdef CONFIG_WS_TRANSPORT
#include "esp_transport_ws.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ESP_HTTP_SERVER_ENABLED
#include "esp_http_server.h"
#endif
#ifdef CONFIG_ESP_HTTPS_SERVER_ENABLE
#include "esp_https_server.h"
#endif
#if defined(ESP_IDF_COMP_ESP_WEBSOCKET_CLIENT_ENABLED) || defined(ESP_IDF_COMP_ESPRESSIF__ESP_WEBSOCKET_CLIENT_ENABLED)
#include "esp_websocket_client.h"
#endif
#if defined(ESP_IDF_COMP_MDNS_ENABLED) || defined(ESP_IDF_COMP_ESPRESSIF__MDNS_ENABLED)
#include "mdns.h"
#endif
#ifdef ESP_IDF_COMP_MQTT_ENABLED
#include "mqtt_client.h"
#ifdef CONFIG_MQTT_PROTOCOL_5
#include "mqtt5_client.h"
#endif
#endif
#ifdef ESP_IDF_COMP_NVS_FLASH_ENABLED
#include "nvs.h"
#include "nvs_flash.h"
#endif
#ifdef ESP_IDF_COMP_WIFI_PROVISIONING_ENABLED
#include "wifi_provisioning/manager.h"
#include "wifi_provisioning/scheme_ble.h"
#include "wifi_provisioning/scheme_softap.h"
#endif
#ifdef ESP_IDF_COMP_SOC_ENABLED
#include "soc/gpio_periph.h"
#include "soc/rtc_periph.h"
#endif
#define OLD_DRIVER_COMP ((ESP_IDF_VERSION_MAJOR < 5 || ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR < 3) && defined(ESP_IDF_COMP_DRIVER_ENABLED))
#define OLD_DRIVER_COMP_TWAI ((ESP_IDF_VERSION_MAJOR < 5 || ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR < 5) && defined(ESP_IDF_COMP_DRIVER_ENABLED))
#if ESP_IDF_VERSION_MAJOR < 6 && defined(ESP_IDF_COMP_DRIVER_ENABLED)
#include "driver/adc.h"
#endif
#if ESP_IDF_VERSION_MAJOR > 4 && (defined(ESP_IDF_COMP_ESP_ADC_CAL_ENABLED) || defined(ESP_IDF_COMP_ESP_ADC_ENABLED))
#include "esp_adc/adc_oneshot.h"
#include "esp_adc/adc_continuous.h"
#endif
#if OLD_DRIVER_COMP_TWAI || defined(ESP_IDF_COMP_ESP_DRIVER_TWAI_ENABLED)
#include "driver/twai.h"
#endif
#if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_DAC_ENABLED)
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2)
#if ESP_IDF_VERSION_MAJOR < 6
#include "driver/dac.h"
#endif
#if ESP_IDF_VERSION_MAJOR > 5 || ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR >= 1
#include "driver/dac_continuous.h"
#include "driver/dac_cosine.h"
#include "driver/dac_oneshot.h"
#endif
#endif
#endif
#if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_GPIO_ENABLED)
#include "driver/gpio.h"
#endif
#if ESP_IDF_VERSION_MAJOR > 4 && (OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_GPTIMER_ENABLED))
#include "driver/gptimer.h"
#endif
#if defined(ESP_IDF_COMP_DRIVER_ENABLED) && ESP_IDF_VERSION_MAJOR < 6
#include "driver/timer.h"
#endif
#if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_I2C_ENABLED)
#include "driver/i2c.h"
#if ESP_IDF_VERSION_MAJOR > 5 || (ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR > 1)
#include "driver/i2c_types.h"
#include "driver/i2c_master.h"
#include "driver/i2c_slave.h"
#endif
#endif
#if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_LEDC_ENABLED)
#include "driver/ledc.h"
#endif
#if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_I2S_ENABLED)
#if ESP_IDF_VERSION_MAJOR < 6
#include "driver/i2s.h"
#endif
#if ESP_IDF_VERSION_MAJOR > 4
#include "driver/i2s_common.h"
#include "driver/i2s_pdm.h"
#include "driver/i2s_std.h"
#include "driver/i2s_tdm.h"
#include "driver/i2s_types.h"
#endif
#endif
#if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_MCPWM_ENABLED)
#if ESP_IDF_VERSION_MAJOR > 4
#define extra_flags mcpwm_drv_extra_flags
#include "driver/mcpwm_prelude.h"
#undef extra_flags
#else
#include "driver/mcpwm.h"
#endif
#endif
#if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_PCNT_ENABLED)
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32H2) || defined(CONFIG_IDF_TARGET_ESP32C5) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32P4)
#if ESP_IDF_VERSION_MAJOR < 6
#include "driver/pcnt.h"
#endif
#if ESP_IDF_VERSION_MAJOR >= 5
#include "driver/pulse_cnt.h"
#endif
#endif
#endif
#if ESP_IDF_VERSION_MAJOR < 6
#include "driver/periph_ctrl.h"
#endif
#if (OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_RMT_ENABLED))
#if ESP_IDF_VERSION_MAJOR < 6
#include "driver/rmt.h"
#endif
#if ESP_IDF_VERSION_MAJOR >= 5
#define rmt_channel_t rmt_drv_channel_t
#include "driver/rmt_encoder.h"
#include "driver/rmt_tx.h"
#include "driver/rmt_rx.h"
#undef rmt_channel_t
#endif
#endif
#if ESP_IDF_VERSION_MAJOR < 6
#include "driver/rtc_cntl.h"
#endif
#include "driver/rtc_io.h"
#if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_SDIO_ENABLED)
#ifdef SOC_SDIO_SLAVE_SUPPORTED
#include "driver/sdio_slave.h"
#endif
#endif
#if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_SDMMC_ENABLED)
#include "driver/sdmmc_defs.h"
#include "driver/sdmmc_host.h"
#include "driver/sdmmc_types.h"
#include "driver/sdspi_host.h"
#endif
#if defined(ESP_IDF_COMP_SDMMC_ENABLED)
#include "sdmmc_cmd.h"
#endif
#if ESP_IDF_VERSION_MAJOR < 6
#include "driver/sigmadelta.h"
#endif
#if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_SPI_ENABLED)
#include "driver/spi_common.h"
#include "driver/spi_master.h"
#include "driver/spi_slave.h"
#endif
#if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_TOUCH_SENS_ENABLED)
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3)
#include "driver/touch_pad.h"
#endif
#endif
#if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_UART_ENABLED)
#include "driver/uart.h"
#include "driver/uart_select.h"
#endif
#if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_TSENS_ENABLED)
#if ESP_IDF_VERSION_MAJOR > 4 && defined(SOC_TEMP_SENSOR_SUPPORTED)
#include "driver/temperature_sensor.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ESPCOREDUMP_ENABLED
#ifdef CONFIG_ESP_COREDUMP_ENABLE
#include "esp_core_dump.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ESP_SERIAL_SLAVE_LINK_ENABLED
#include "esp_serial_slave_link/essl.h"
#include "esp_serial_slave_link/essl_sdio.h"
#endif
#ifdef ESP_IDF_COMP_PTHREAD_ENABLED
#include "pthread.h"
#include "esp_pthread.h"
#endif
#ifdef ESP_IDF_COMP_USB_ENABLED
#ifdef CONFIG_USB_OTG_SUPPORTED
#include "usb/usb_host.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ULP_ENABLED
#if (ESP_IDF_VERSION_MAJOR > 4)
#ifdef CONFIG_ULP_COPROC_ENABLED
#if CONFIG_ULP_COPROC_TYPE_FSM
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/ulp.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/ulp.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/ulp.h"
#endif
#else
#include "ulp_riscv.h"
#endif
#endif
#else
#ifdef CONFIG_ESP32_ULP_COPROC_ENABLED
#include "esp32/ulp.h"
#endif
#ifdef CONFIG_ESP32S2_ULP_COPROC_ENABLED
#ifdef CONFIG_ESP32S2_ULP_COPROC_RISCV
#include "esp32s2/ulp_riscv.h"
#else
#include "esp32s2/ulp.h"
#endif
#endif
#ifdef CONFIG_ESP32S3_ULP_COPROC_ENABLED
#ifdef CONFIG_ESP32S3_ULP_COPROC_RISCV
#include "esp32s3/ulp_riscv.h"
#else
#include "esp32s2/ulp.h"
#endif
#endif
#endif
#endif
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32P4)
#ifdef CONFIG_BT_ENABLED
#include "esp_bt.h"
#ifdef CONFIG_BT_BLUEDROID_ENABLED
#include "esp_bt_defs.h"
#include "esp_bt_device.h"
#include "esp_bt_main.h"
#ifdef CONFIG_IDF_TARGET_ESP32
#ifdef CONFIG_BT_CLASSIC_ENABLED
#ifdef CONFIG_BT_A2DP_ENABLE
#include "esp_a2dp_api.h"
#include "esp_avrc_api.h"
#endif
#include "esp_gap_bt_api.h"
#ifdef CONFIG_BT_HFP_ENABLE
#include "esp_hf_ag_api.h"
#include "esp_hf_client_api.h"
#endif
#ifdef CONFIG_BT_HID_ENABLED
#include "esp_hidd_api.h"
#endif
#include "esp_hidh_api.h"
#if ESP_IDF_VERSION_MAJOR > 4
#include "esp_sdp_api.h"
#endif
#ifdef CONFIG_BT_SPP_ENABLED
#include "esp_spp_api.h"
#endif
#endif #endif
#ifdef CONFIG_BT_BLE_ENABLED
#include "esp_gap_ble_api.h"
#include "esp_gatt_defs.h"
#include "esp_gatt_common_api.h"
#ifdef CONFIG_BT_GATTC_ENABLE
#include "esp_gattc_api.h"
#endif
#ifdef CONFIG_BT_GATTS_ENABLE
#include "esp_gatts_api.h"
#endif
#if ESP_IDF_VERSION_MAJOR > 4
#ifdef CONFIG_BT_L2CAP_ENABLED
#include "esp_l2cap_bt_api.h"
#endif
#endif
#endif #endif
#ifdef CONFIG_BT_NIMBLE_ENABLED
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
#include "esp_nimble_hci.h"
#endif
#include "nimble/nimble_port.h"
#include "nimble/nimble_port_freertos.h"
#include "host/ble_hs.h"
#include "host/util/util.h"
#include "services/gap/ble_svc_gap.h"
#include "services/gatt/ble_svc_gatt.h"
#endif
#ifdef CONFIG_BLE_MESH
#include "esp_ble_mesh_defs.h"
#include "esp_ble_mesh_ble_api.h"
#include "esp_ble_mesh_common_api.h"
#include "esp_ble_mesh_local_data_operation_api.h"
#include "esp_ble_mesh_low_power_api.h"
#include "esp_ble_mesh_networking_api.h"
#include "esp_ble_mesh_provisioning_api.h"
#include "esp_ble_mesh_proxy_api.h"
#endif
#endif
#endif
#ifdef SOC_GP_LDO_SUPPORTED
#include "esp_ldo_regulator.h"
#endif
#ifdef ESP_IDF_COMP_ESP_LCD_ENABLED
#include "esp_lcd_panel_commands.h"
#include "esp_lcd_panel_io.h"
#include "esp_lcd_panel_ops.h"
#include "esp_lcd_panel_vendor.h"
#include "esp_lcd_types.h"
#include "esp_lcd_panel_interface.h"
#include "esp_lcd_panel_io_interface.h"
#if ESP_IDF_VERSION_MAJOR < 6
#if ESP_IDF_VERSION_MAJOR == 4 && ESP_IDF_VERSION_MINOR >= 4 || (ESP_IDF_VERSION_MAJOR >= 5 && ESP_IDF_VERSION_MINOR <= 2 || SOC_LCD_RGB_SUPPORTED)
#include "esp_lcd_panel_rgb.h"
#endif #endif
#if ESP_IDF_VERSION_MAJOR > 5 || ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR >= 3
#include "esp_lcd_panel_dev.h"
#if ESP_IDF_VERSION_MAJOR < 6
#include "esp_lcd_panel_nt35510.h"
#endif
#include "esp_lcd_panel_ssd1306.h"
#include "esp_lcd_panel_st7789.h"
#ifdef SOC_MIPI_DSI_SUPPORTED
#include "esp_lcd_mipi_dsi.h"
#endif
#endif
#endif
#ifdef SOC_USB_SERIAL_JTAG_SUPPORTED
#include "driver/usb_serial_jtag.h"
#endif
#ifdef ESP_IDF_COMP_ESPRESSIF__ESP_TINYUSB_ENABLED
#include "tinyusb.h"
#include "tinyusb_net.h"
#include "tinyusb_types.h"
#if CONFIG_TINYUSB_CDC_ENABLED
#include "tusb_cdc_acm.h"
#endif
#include "tusb_config.h"
#include "tusb_console.h"
#include "tusb_tasks.h"
#ifdef ESP_IDF_COMP_VFS_ENABLED
#include "tusb_msc_storage.h"
#include "vfs_tinyusb.h"
#endif
#endif
#ifdef ESP_IDF_COMP_ESPRESSIF__ONEWIRE_BUS_ENABLED
#include "onewire_bus.h"
#include "onewire_device.h"
#endif