mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
esp_wifi: support esp32s2beta A, B and marlin3 chip
This commit is contained in:

committed by
Angus Gratton

parent
7ce75a42c7
commit
5ffb42b4dd
@@ -4,6 +4,26 @@ menu "ESP32S2-specific"
|
||||
# not working so we just hide all items here
|
||||
visible if IDF_TARGET_ESP32S2BETA
|
||||
|
||||
choice ESP32S2_BETA_CHIP_VERSION
|
||||
# TODO: remove once final S2 chip is supported
|
||||
prompt "ESP32-S2 Beta chip version"
|
||||
default ESP32S2_BETA_VERSION_MARLIN3
|
||||
help
|
||||
There are three versions of ESP32-S2 beta chip with different Wi-Fi PHY: A, B and Marlin3.
|
||||
|
||||
The correct setting is required for Wi-Fi to work correctly. If unsure which version you
|
||||
have, please contact Espressif.
|
||||
|
||||
The Wi-Fi performance of Marlin3 is the best among the three versions of chip.
|
||||
|
||||
config ESP32S2_BETA_VERSION_A
|
||||
bool "Version A"
|
||||
config ESP32S2_BETA_VERSION_B
|
||||
bool "Version B"
|
||||
config ESP32S2_BETA_VERSION_MARLIN3
|
||||
bool "Version Marlin3"
|
||||
endchoice
|
||||
|
||||
choice ESP32S2_DEFAULT_CPU_FREQ_MHZ
|
||||
prompt "CPU frequency"
|
||||
default ESP32S2_DEFAULT_CPU_FREQ_160
|
||||
|
@@ -38,13 +38,15 @@
|
||||
#include "esp_private/wifi_os_adapter.h"
|
||||
#include "esp_private/wifi.h"
|
||||
#include "esp_phy_init.h"
|
||||
#if CONFIG_IDF_TARGET_ESP32S2BETA
|
||||
#include "esp32s2beta/clk.h"
|
||||
#endif
|
||||
#include "driver/periph_ctrl.h"
|
||||
#include "nvs.h"
|
||||
#include "os.h"
|
||||
#include "esp_smartconfig.h"
|
||||
#include "esp_coexist_internal.h"
|
||||
#include "esp_coexist_adapter.h"
|
||||
#include "esp32s2beta/clk.h"
|
||||
|
||||
#define TAG "esp_adapter"
|
||||
|
||||
@@ -437,6 +439,13 @@ static uint32_t coex_status_get_wrapper(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void coex_condition_set_wrapper(uint32_t type, bool dissatisfy)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
coex_condition_set(type, dissatisfy);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int coex_wifi_request_wrapper(uint32_t event, uint32_t latency, uint32_t duration)
|
||||
{
|
||||
#if CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
|
||||
@@ -576,7 +585,9 @@ wifi_osi_funcs_t g_wifi_osi_funcs = {
|
||||
._get_random = os_get_random,
|
||||
._get_time = get_time_wrapper,
|
||||
._random = os_random,
|
||||
#if CONFIG_IDF_TARGET_ESP32S2BETA
|
||||
._slowclk_cal_get = esp_clk_slowclk_cal_get,
|
||||
#endif
|
||||
._log_write = esp_log_write,
|
||||
._log_timestamp = esp_log_timestamp,
|
||||
._malloc_internal = malloc_internal_wrapper,
|
||||
@@ -594,6 +605,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs = {
|
||||
._modem_sleep_register = esp_modem_sleep_register,
|
||||
._modem_sleep_deregister = esp_modem_sleep_deregister,
|
||||
._coex_status_get = coex_status_get_wrapper,
|
||||
._coex_condition_set = coex_condition_set_wrapper,
|
||||
._coex_wifi_request = coex_wifi_request_wrapper,
|
||||
._coex_wifi_release = coex_wifi_release_wrapper,
|
||||
._magic = ESP_WIFI_OS_ADAPTER_MAGIC,
|
||||
|
Reference in New Issue
Block a user