ChenJianxing 5 лет назад
Родитель
Сommit
7cbb970b50

+ 2 - 1
examples/wifi/simple_sniffer/main/Kconfig.projbuild

@@ -9,7 +9,8 @@ menu "Example Configuration"
 
     choice SNIFFER_PCAP_DESTINATION
         prompt "Select destination to store pcap file"
-        default SNIFFER_PCAP_DESTINATION_SD
+        default SNIFFER_PCAP_DESTINATION_SD if IDF_TARGET_ESP32
+        default SNIFFER_PCAP_DESTINATION_JTAG if IDF_TARGET_ESP32S2
         help
             Select where to store the pcap file.
             Currently support storing files to SD card or to host via JTAG interface.

+ 2 - 0
examples/wifi/simple_sniffer/main/simple_sniffer_example_main.c

@@ -19,8 +19,10 @@
 #include "esp_wifi.h"
 #include "esp_err.h"
 #include "esp_log.h"
+#if CONFIG_SNIFFER_PCAP_DESTINATION_SD
 #include "driver/sdmmc_host.h"
 #include "driver/sdspi_host.h"
+#endif
 #include "nvs_flash.h"
 #include "sdmmc_cmd.h"
 #include "cmd_system.h"