esp_wifi: re-enable build wifi example

This commit is contained in:
Chen Jian Xing 2020-06-02 17:38:22 +08:00 committed by Jiang Jiang Jian
parent 738e9f76fd
commit ebb2caa940
6 changed files with 14 additions and 10 deletions

View file

@ -24,6 +24,10 @@ extern "C" {
#include "esp32/rom/crc.h" #include "esp32/rom/crc.h"
#endif #endif
#if defined(CONFIG_IDF_TARGET_ESP32S2)
#include "esp32s2/rom/crc.h"
#endif
/******************* Polynomials Used in the CRC APIs **************************** /******************* Polynomials Used in the CRC APIs ****************************
* CRC-8 x8+x2+x1+1 0x07 * CRC-8 x8+x2+x1+1 0x07
* CRC16-CCITT x16+x12+x5+1 0x1021 * CRC16-CCITT x16+x12+x5+1 0x1021
@ -43,6 +47,7 @@ static inline uint32_t esp_crc32_le(uint32_t crc, uint8_t const *buf, uint32_t l
return crc32_le(crc, buf, len); return crc32_le(crc, buf, len);
} }
#if defined(CONFIG_IDF_TARGET_ESP32)
/** /**
* @brief CRC32 value in big endian. * @brief CRC32 value in big endian.
* *
@ -55,6 +60,7 @@ static inline uint32_t esp_crc32_be(uint32_t crc, uint8_t const *buf, uint32_t l
{ {
return crc32_be(crc, buf, len); return crc32_be(crc, buf, len);
} }
#endif
/** /**
* @brief CRC16 value in little endian. * @brief CRC16 value in little endian.
@ -69,6 +75,7 @@ static inline uint16_t esp_crc16_le(uint16_t crc, uint8_t const *buf, uint32_t l
return crc16_le(crc, buf, len); return crc16_le(crc, buf, len);
} }
#if defined(CONFIG_IDF_TARGET_ESP32)
/** /**
* @brief CRC16 value in big endian. * @brief CRC16 value in big endian.
* *
@ -81,6 +88,7 @@ static inline uint16_t esp_crc16_be(uint16_t crc, uint8_t const *buf, uint32_t l
{ {
return crc16_be(crc, buf, len); return crc16_be(crc, buf, len);
} }
#endif
/** /**
* @brief CRC8 value in little endian. * @brief CRC8 value in little endian.
@ -95,6 +103,7 @@ static inline uint8_t esp_crc8_le(uint8_t crc, uint8_t const *buf, uint32_t len)
return crc8_le(crc, buf, len); return crc8_le(crc, buf, len);
} }
#if defined(CONFIG_IDF_TARGET_ESP32)
/** /**
* @brief CRC8 value in big endian. * @brief CRC8 value in big endian.
* *
@ -107,6 +116,7 @@ static inline uint8_t esp_crc8_be(uint8_t crc, uint8_t const *buf, uint32_t len)
{ {
return crc8_be(crc, buf, len); return crc8_be(crc, buf, len);
} }
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -1,6 +1,3 @@
| Supported Targets | ESP32 |
| ----------------- | ----- |
# ESPNOW Example # ESPNOW Example
(See the README.md file in the upper level 'examples' directory for more information about examples.) (See the README.md file in the upper level 'examples' directory for more information about examples.)

View file

@ -1,6 +1,3 @@
| Supported Targets | ESP32 |
| ----------------- | ----- |
# Iperf Example # Iperf Example
## Note about iperf version ## Note about iperf version

View file

@ -1,6 +1,3 @@
| Supported Targets | ESP32 |
| ----------------- | ----- |
# Simple Sniffer Example # Simple Sniffer Example
(See the README.md file in the upper level 'examples' directory for more information about examples.) (See the README.md file in the upper level 'examples' directory for more information about examples.)

View file

@ -9,7 +9,8 @@ menu "Example Configuration"
choice SNIFFER_PCAP_DESTINATION choice SNIFFER_PCAP_DESTINATION
prompt "Select destination to store pcap file" 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 help
Select where to store the pcap file. Select where to store the pcap file.
Currently support storing files to SD card or to host via JTAG interface. Currently support storing files to SD card or to host via JTAG interface.

View file

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