xtensa/esp32s3: use common Espressif wireless source

Update the wireless symbols from ESP32S3_* to ESPRESSIF_* for using common layer.
Remove ESP32S3 specific WiFi files and edit build system to use common layer.
This commit is contained in:
Filipe Cavalcanti 2025-01-16 15:07:41 -03:00 committed by Alin Jerpelea
parent 38c348bf9a
commit 954081cdd8
41 changed files with 279 additions and 5054 deletions

View file

@ -513,7 +513,10 @@ config ESPRESSIF_WIRELESS
select ESP32S2_RNG if ARCH_CHIP_ESP32S2
select ESP32S2_RT_TIMER if ARCH_CHIP_ESP32S2
select ESP32S2_TIMER0 if ARCH_CHIP_ESP32S2
depends on ARCH_CHIP_ESP32S2
select ESP32S3_RNG if ARCH_CHIP_ESP32S3
select ESP32S3_RT_TIMER if ARCH_CHIP_ESP32S3
select ESP32S3_TIMER0 if ARCH_CHIP_ESP32S3
depends on ARCH_CHIP_ESP32S2 || ARCH_CHIP_ESP32S3
---help---
Enable Wireless support
@ -524,6 +527,32 @@ config ESPRESSIF_WIFI
---help---
Enable Wi-Fi support
config ESPRESSIF_BLE
bool "BLE"
depends on ARCH_CHIP_ESP32S3
default n
select ESPRESSIF_WIRELESS
---help---
Enable BLE support.
config ESP_COEX_SW_COEXIST_ENABLE
bool "Software WiFi/Bluetooth/IEEE 802.15.4 coexistence"
depends on (ESPRESSIF_WIFI && ESPRESSIF_BLE)
default y
---help---
If enabled, WiFi & Bluetooth coexistence is controlled by software rather than hardware.
Recommended for heavy traffic scenarios. Both coexistence configuration options are
automatically managed, no user intervention is required.
If only Bluetooth is used, it is recommended to disable this option to reduce binary file
size.
menuconfig ESPRESSIF_WIFI_BT_COEXIST
bool "Wi-Fi and BT coexist"
default y if ESPRESSIF_WIFI && ESPRESSIF_BLE
default n
depends on ESPRESSIF_WIFI && ESPRESSIF_BLE
select ESPRESSIF_WIFI_STA_DISCONNECT_PM
menu "Wi-Fi Configuration"
depends on ESPRESSIF_WIFI
@ -692,3 +721,22 @@ config ESPRESSIF_WIFI_LISTEN_INTERVAL
to beacon is 300 ms.
endmenu # ESPRESSIF_WIFI
menu "BLE Configuration"
depends on ESPRESSIF_BLE
config ESPRESSIF_BLE_TASK_STACK_SIZE
int "Controller task stack size"
default 4096
config ESPRESSIF_BLE_TASK_PRIORITY
int "Controller task priority"
default 253
config ESPRESSIF_BLE_INTERRUPT_SAVE_STATUS
int "Number of interrupt save status"
default 3
---help---
Number of interrupt save status variables to keep track. Increase it if any related bug is found.
endmenu # BLE Configuration

View file

@ -20,13 +20,24 @@
#
############################################################################
ifeq ($(CONFIG_ARCH_CHIP_ESP32S3),y)
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bt$(DELIM)include$(DELIM)esp32c3$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_coex$(DELIM)include
endif
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)soc$(DELIM)$(CHIP_SERIES)$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)nuttx$(DELIM)$(CHIP_SERIES)$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)nuttx$(DELIM)include$(DELIM)esp_wifi
ifeq ($(CONFIG_ARCH_CHIP_ESP32S3),y)
EXTRA_LIBPATHS += -L $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bt$(DELIM)controller$(DELIM)lib_esp32c3_family$(DELIM)$(CHIP_SERIES)
EXTRA_LIBPATHS += -L $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_coex$(DELIM)lib$(DELIM)$(CHIP_SERIES)
endif
EXTRA_LIBPATHS += -L $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_phy$(DELIM)lib$(DELIM)$(CHIP_SERIES)
EXTRA_LIBPATHS += -L $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_wifi$(DELIM)lib$(DELIM)$(CHIP_SERIES)
ifeq ($(CONFIG_ARCH_CHIP_ESP32S3),y)
EXTRA_LIBS += -lcoexist
endif
EXTRA_LIBS += -lphy
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)

View file

@ -37,6 +37,9 @@
#ifdef CONFIG_ARCH_CHIP_ESP32S2
#include "esp32s2_wifi_adapter.h"
#endif
#ifdef CONFIG_ARCH_CHIP_ESP32S3
#include "esp32s3_wifi_adapter.h"
#endif
#include "esp_wifi_utils.h"
#include "esp_wireless.h"

View file

@ -32,6 +32,9 @@
#ifdef CONFIG_ARCH_CHIP_ESP32S2
# include "esp32s2_wifi_adapter.h"
#endif
#ifdef CONFIG_ARCH_CHIP_ESP32S3
# include "esp32s3_wifi_adapter.h"
#endif
#ifndef __ASSEMBLY__

View file

@ -655,31 +655,6 @@ config ESP32S3_UART2
select UART2_SERIALDRIVER
select ARCH_HAVE_SERIAL_TERMIOS
config ESP32S3_WIRELESS
bool
default n
select NET
select ARCH_PHY_INTERRUPT
select ESP32S3_RNG
select ESP32S3_RT_TIMER
select ESP32S3_TIMER0
---help---
Enable Wireless support
config ESP32S3_WIFI
bool "Wi-Fi"
default n
select ESP32S3_WIRELESS
---help---
Enable Wi-Fi support
config ESP32S3_BLE
bool "BLE"
default n
select ESP32S3_WIRELESS
---help---
Enable BLE support
config ESP32S3_I2C0
bool "I2C 0"
default n
@ -822,13 +797,6 @@ config ESP32S3_AES_ACCELERATOR
endmenu # ESP32-S3 Peripheral Selection
menuconfig ESP32S3_WIFI_BT_COEXIST
bool "Wi-Fi and BT coexist"
default y if ESP32S3_WIFI && ESP32S3_BLE
default n
depends on ESP32S3_WIFI && ESP32S3_BLE
select ESP32S3_WIFI_STA_DISCONNECT_PM
menu "Interrupt Configuration"
config ESP32S3_IRAM_ISR_DEBUG
@ -1494,180 +1462,10 @@ config ESP32S3_TWAI_REGDEBUG
endmenu #ESP32S3_TWAI
menu "Wi-Fi Configuration"
depends on ESP32S3_WIFI
menu "ESP WPA-Supplicant"
config WPA_WAPI_PSK
bool "Enable WAPI PSK support"
default n
---help---
Select this option to enable WAPI-PSK
which is a Chinese National Standard Encryption for Wireless LANs (GB 15629.11-2003).
config WPA_SUITE_B_192
bool "Enable NSA suite B support with 192-bit key"
default n
select ESP_WIFI_GCMP_SUPPORT
select ESP_WIFI_GMAC_SUPPORT
---help---
Select this option to enable 192-bit NSA suite-B.
This is necessary to support WPA3 192-bit security.
config ESP_WPA_DEBUG_PRINT
bool "Print debug messages from Espressif's WPA Supplicant"
default n
---help---
Select this option to print logging information from WPA supplicant,
this includes handshake information and key hex dumps depending
on the project logging level.
Enabling this could increase the build size ~60kb
depending on the project logging level.
endmenu # ESP WPA-Supplicant
choice
prompt "ESP32S3 Wi-Fi mode"
default ESP32S3_WIFI_STATION
config ESP32S3_WIFI_STATION
bool "Station mode"
config ESP32S3_WIFI_SOFTAP
bool "SoftAP mode"
config ESP32S3_WIFI_STATION_SOFTAP
bool "Station + SoftAP"
endchoice # ESP32S3 Wi-Fi mode
config ESP_WIFI_ENABLE_SAE_PK
bool "Enable SAE-PK"
default y
---help---
Select this option to enable SAE-PK
config ESP_WIFI_ENABLE_WPA3_OWE_STA
bool "Enable OWE STA"
default y
---help---
Select this option to allow the device to establish OWE connection with eligible AP's.
PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide for details.
config ESP32S3_WIFI_STATIC_RXBUF_NUM
int "Wi-Fi static RX buffer number"
default 10
config ESP32S3_WIFI_DYNAMIC_RXBUF_NUM
int "Wi-Fi dynamic RX buffer number"
default 32
config ESP32S3_WIFI_DYNAMIC_TXBUF_NUM
int "Wi-Fi dynamic TX buffer number"
default 32
config ESP32S3_WIFI_TX_AMPDU
bool "Wi-Fi TX AMPDU"
default y
config ESP32S3_WIFI_RX_AMPDU
bool "Wi-Fi RX AMPDU"
default y
config ESP32S3_WIFI_RXBA_AMPDU_WZ
int "Wi-Fi RX BA AMPDU windown size"
default 6
config ESP32S3_WLAN_PKTBUF_NUM
int "WLAN netcard packet buffer number per netcard"
default 16
config ESP_WIFI_GCMP_SUPPORT
bool "WiFi GCMP Support(GCMP128 and GCMP256)"
default n
---help---
Select this option to enable GCMP support. GCMP support is compulsory for WiFi Suite-B support.
config ESP_WIFI_GMAC_SUPPORT
bool "WiFi GMAC Support(GMAC128 and GMAC256)"
default n
---help---
Select this option to enable GMAC support. GMAC support is compulsory for WiFi 192-bit certification.
config ESP32S3_WIFI_CONNECT_TIMEOUT
int "Connect timeout in second"
default 10
---help---
Max waiting time of connecting to AP.
config ESP32S3_WIFI_SCAN_RESULT_SIZE
int "Scan result buffer"
default 4096
---help---
Maximum scan result buffer size.
config ESP32S3_WIFI_STA_DISCONNECT_PM
bool "Power Management for station when disconnected"
default y
---help---
Select this option to enable power management for station when disconnected.
Chip will do modem-sleep when RF module is not in use anymore.
choice ESP32S3_POWER_SAVE_MODE
prompt "Wi-Fi Power save mode"
default ESP32S3_POWER_SAVE_MIN_MODEM if ESP32S3_WIFI_BT_COEXIST
default ESP32S3_POWER_SAVE_NONE
---help---
Wi-Fi supports the Modem-sleep mode which refers to the legacy power-saving mode in the IEEE 802.11 protocol.
Modem-sleep mode works in station-only mode and the station must connect to the AP first. If the Modem-sleep
mode is enabled, station will switch between active and sleep state periodically. In sleep state, RF, PHY and
BB are turned off in order to reduce power consumption. Station can keep connection with AP in modem-sleep mode.
Modem-sleep mode includes minimum and maximum power-saving modes.
In minimum power-saving mode, station wakes
up every DTIM to receive beacon. Broadcast data will not be lost because it is transmitted after DTIM.
However, it cannot save much more power if DTIM is short for DTIM is determined by AP.
In maximum power-saving mode, station wakes up in every listen interval to receive beacon. This listen interval
can be set to be longer than the AP DTIM period. Broadcast data may be lost because station may be in sleep
state at DTIM time. If listen interval is longer, more power is saved, but broadcast data is more easy to lose.
Listen interval can be configured by setting ESP32S3_WIFI_LISTEN_INTERVAL.
ESP32S3_POWER_SAVE_NONE disables Modem-sleep mode entirely. Disabling it increases power consumption, but
minimizes the delay in receiving Wi-Fi data in real time. When Modem-sleep mode is enabled, the delay in
receiving Wi-Fi data may be the same as the DTIM cycle (minimum power-saving mode) or the listening interval
(maximum power-saving mode). Setting ESP32S3_POWER_SAVE_NONE is suitable when high throughput is required.
config ESP32S3_POWER_SAVE_NONE
bool "No power save"
config ESP32S3_POWER_SAVE_MIN_MODEM
bool "Minimum modem power saving."
config ESP32S3_POWER_SAVE_MAX_MODEM
bool "Maximum modem power saving"
endchoice # ESP32S3_POWER_SAVE_MODE
config ESP32S3_WIFI_LISTEN_INTERVAL
int "Wi-Fi listen interval"
depends on ESP32S3_POWER_SAVE_MAX_MODEM
default 3
---help---
Interval for station to listen to beacon from AP. The unit of listen interval is one beacon interval.
For example, if beacon interval is 100 ms and listen interval is 3, the interval for station to listen
to beacon is 300 ms.
endmenu # ESP32S3_WIFI
config ESP32S3_OPENETH
bool "Opencores Ethernet MAC"
default n
depends on !ESP32S3_WIFI
depends on !ESPRESSIF_WIFI
select NET
select SCHED_WORKQUEUE
---help---
@ -1685,29 +1483,10 @@ config ESP32S3_OPENETH_DMA_RX_BUFFER_NUM
endif # ESP32S3_OPENETH
menu "BLE Configuration"
depends on ESP32S3_BLE
config ESP32S3_BLE_TASK_STACK_SIZE
int "Controller task stack size"
default 4096
config ESP32S3_BLE_TASK_PRIORITY
int "Controller task priority"
default 253
config ESP32S3_BLE_INTERRUPT_SAVE_STATUS
int "Number of interrupt save status"
default 3
---help---
Number of interrupt save status variables to keep track. Increase it if any related bug is found.
endmenu # BLE Configuration
choice ESP32S3_UNIVERSAL_MAC_ADDRESSES
bool "Number of universally administered (by IEEE) MAC address"
default ESP32S3_UNIVERSAL_MAC_ADDRESSES_FOUR
depends on ESP32S3_WIFI || ESP32S3_BLE
depends on ESPRESSIF_WIFI || ESPRESSIF_BLE
---help---
Configure the number of universally administered (by IEEE) MAC addresses.
During initialization, MAC addresses for each network interface are generated or derived from a

View file

@ -208,6 +208,15 @@ ifeq ($(CONFIG_ESP32S3_OPENETH),y)
CHIP_CSRCS += esp_openeth.c
endif
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)
CHIP_CSRCS += esp32s3_wifi_adapter.c
endif
ifeq ($(CONFIG_ESPRESSIF_BLE),y)
CHIP_CSRCS += esp32s3_ble_adapter.c esp32s3_ble.c
EXTRA_LIBS += -lbtbb -lbtdm_app
endif
#############################################################################
# Espressif HAL for 3rd Party Platforms
#############################################################################
@ -216,7 +225,7 @@ endif
ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
ifndef ESP_HAL_3RDPARTY_VERSION
ESP_HAL_3RDPARTY_VERSION = 87ccbf88b6fd490dae1993524e70f51bb2ea181d
ESP_HAL_3RDPARTY_VERSION = e5cef265cca9d272c428d210453d574bcc25c5f4
endif
ifndef ESP_HAL_3RDPARTY_URL
@ -269,7 +278,7 @@ include chip/hal.mk
include common/espressif/Make.defs
context:: chip/$(ESP_HAL_3RDPARTY_REPO)
ifeq ($(CONFIG_ESP32S3_WIRELESS),y)
ifeq ($(CONFIG_ESPRESSIF_WIRELESS),y)
$(Q) echo "Espressif HAL for 3rd Party Platforms: initializing submodules..."
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) submodule --quiet update --init $(GIT_DEPTH_PARAMETER) components/mbedtls/mbedtls components/esp_phy/lib components/esp_wifi/lib components/bt/controller/lib_esp32c3_family components/esp_coex/lib
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls reset --quiet --hard
@ -277,9 +286,5 @@ ifeq ($(CONFIG_ESP32S3_WIRELESS),y)
$(Q) cd chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls && git apply ../../../nuttx/patches/components/mbedtls/mbedtls/*.patch
endif
ifeq ($(CONFIG_ESP32S3_WIRELESS),y)
include chip/Wireless.mk
endif
distclean::
$(call DELDIR,chip/$(ESP_HAL_3RDPARTY_REPO))

View file

@ -1,256 +0,0 @@
############################################################################
# arch/xtensa/src/esp32s3/Wireless.mk
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bt$(DELIM)include$(DELIM)esp32c3$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_coex$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)soc$(DELIM)$(CHIP_SERIES)$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)nuttx$(DELIM)$(CHIP_SERIES)$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)nuttx$(DELIM)include$(DELIM)esp_wifi
EXTRA_LIBPATHS += -L $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bt$(DELIM)controller$(DELIM)lib_esp32c3_family$(DELIM)$(CHIP_SERIES)
EXTRA_LIBPATHS += -L $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_coex$(DELIM)lib$(DELIM)$(CHIP_SERIES)
EXTRA_LIBPATHS += -L $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_phy$(DELIM)lib$(DELIM)$(CHIP_SERIES)
EXTRA_LIBPATHS += -L $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_wifi$(DELIM)lib$(DELIM)$(CHIP_SERIES)
EXTRA_LIBS += -lphy -lcoexist
# Wireless interfaces.
CHIP_CSRCS += esp32s3_wireless.c
ifeq ($(CONFIG_ESP32S3_BLE),y)
CHIP_CSRCS += esp32s3_ble_adapter.c esp32s3_ble.c
EXTRA_LIBS += -lbtbb -lbtdm_app
endif
ifeq ($(CONFIG_ESP32S3_WIFI),y)
CHIP_CSRCS += esp32s3_wlan.c esp32s3_wifi_utils.c esp32s3_wifi_adapter.c
EXTRA_LIBS += -lcore -lnet80211 -lpp
ifeq ($(CONFIG_WPA_WAPI_PSK),y)
EXTRA_LIBS += -lwapi
endif
## ESP-IDF's mbedTLS
VPATH += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)mbedtls$(DELIM)mbedtls$(DELIM)library
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)mbedtls$(DELIM)mbedtls$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)mbedtls$(DELIM)mbedtls$(DELIM)library
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)mbedtls$(DELIM)port$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)nuttx$(DELIM)include$(DELIM)mbedtls
### Define Espressif's configs for mbedTLS
CFLAGS += $(DEFINE_PREFIX)MBEDTLS_CONFIG_FILE="<mbedtls/esp_config.h>"
CHIP_CSRCS += aes.c
CHIP_CSRCS += aria.c
CHIP_CSRCS += bignum_core.c
CHIP_CSRCS += bignum.c
CHIP_CSRCS += ccm.c
CHIP_CSRCS += cipher_wrap.c
CHIP_CSRCS += cipher.c
CHIP_CSRCS += cmac.c
CHIP_CSRCS += constant_time.c
CHIP_CSRCS += ctr_drbg.c
CHIP_CSRCS += ecp_curves.c
CHIP_CSRCS += ecp.c
CHIP_CSRCS += entropy.c
CHIP_CSRCS += gcm.c
CHIP_CSRCS += md.c
CHIP_CSRCS += pkcs5.c
CHIP_CSRCS += platform_util.c
CHIP_CSRCS += platform.c
CHIP_CSRCS += sha1.c
CHIP_CSRCS += sha3.c
CHIP_CSRCS += sha256.c
CHIP_CSRCS += sha512.c
CHIP_CSRCS += pk.c
CHIP_CSRCS += pk_wrap.c
CHIP_CSRCS += pkparse.c
CHIP_CSRCS += ecdsa.c
CHIP_CSRCS += asn1parse.c
CHIP_CSRCS += asn1write.c
CHIP_CSRCS += rsa.c
CHIP_CSRCS += md5.c
CHIP_CSRCS += oid.c
CHIP_CSRCS += pem.c
CHIP_CSRCS += hmac_drbg.c
CHIP_CSRCS += rsa_alt_helpers.c
CHIP_CSRCS += ecdh.c
CHIP_CSRCS += pk_ecc.c
VPATH += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)mbedtls$(DELIM)port
CHIP_CSRCS += esp_hardware.c
CHIP_CSRCS += esp_mem.c
CHIP_CSRCS += esp_timing.c
VPATH += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)mbedtls$(DELIM)port$(DELIM)md
CHIP_CSRCS += esp_md.c
## WPA Supplicant
WIFI_WPA_SUPPLICANT = chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)wpa_supplicant
CFLAGS += $(DEFINE_PREFIX)__ets__
CFLAGS += $(DEFINE_PREFIX)CONFIG_CRYPTO_MBEDTLS
CFLAGS += $(DEFINE_PREFIX)CONFIG_ECC
CFLAGS += $(DEFINE_PREFIX)CONFIG_IEEE80211W
CFLAGS += $(DEFINE_PREFIX)CONFIG_WPA3_SAE
CFLAGS += $(DEFINE_PREFIX)EAP_PEER_METHOD
CFLAGS += $(DEFINE_PREFIX)ESP_PLATFORM=1
CFLAGS += $(DEFINE_PREFIX)ESP_SUPPLICANT
CFLAGS += $(DEFINE_PREFIX)ESPRESSIF_USE
CFLAGS += $(DEFINE_PREFIX)IEEE8021X_EAPOL
CFLAGS += $(DEFINE_PREFIX)USE_WPA2_TASK
CFLAGS += $(DEFINE_PREFIX)CONFIG_SHA256
CFLAGS += $(DEFINE_PREFIX)CONFIG_SAE
CFLAGS += $(DEFINE_PREFIX)USE_WPS_TASK
ifeq ($(CONFIG_ESP_WIFI_ENABLE_SAE_PK),y)
CFLAGS += $(DEFINE_PREFIX)CONFIG_SAE_PK
endif
ifeq ($(CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA),y)
CFLAGS += $(DEFINE_PREFIX)CONFIG_OWE_STA
endif
ifeq ($(CONFIG_ESP_WIFI_GCMP_SUPPORT),y)
CFLAGS += $(DEFINE_PREFIX)CONFIG_GCMP
endif
ifeq ($(CONFIG_ESP_WIFI_GMAC_SUPPORT),y)
CFLAGS += $(DEFINE_PREFIX)CONFIG_GMAC
endif
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)src
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)ap
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)ap
CHIP_CSRCS += ap_config.c
CHIP_CSRCS += ieee802_11.c
CHIP_CSRCS += comeback_token.c
CHIP_CSRCS += pmksa_cache_auth.c
CHIP_CSRCS += sta_info.c
CHIP_CSRCS += wpa_auth_ie.c
CHIP_CSRCS += wpa_auth.c
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)common
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)common
CHIP_CSRCS += dragonfly.c
CHIP_CSRCS += sae.c
CHIP_CSRCS += wpa_common.c
CHIP_CSRCS += sae_pk.c
CHIP_CSRCS += bss.c
CHIP_CSRCS += scan.c
CHIP_CSRCS += ieee802_11_common.c
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)crypto
CHIP_CSRCS += aes-ccm.c
CHIP_CSRCS += aes-gcm.c
CHIP_CSRCS += aes-omac1.c
CHIP_CSRCS += aes-unwrap.c
CHIP_CSRCS += aes-wrap.c
CHIP_CSRCS += ccmp.c
CHIP_CSRCS += crypto_ops.c
CHIP_CSRCS += des-internal.c
CHIP_CSRCS += dh_groups.c
CHIP_CSRCS += rc4.c
CHIP_CSRCS += sha1-prf.c
CHIP_CSRCS += sha256-kdf.c
CHIP_CSRCS += sha256-prf.c
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)eap_peer
CHIP_CSRCS += chap.c
CHIP_CSRCS += eap_common.c
CHIP_CSRCS += eap_mschapv2.c
CHIP_CSRCS += eap_peap_common.c
CHIP_CSRCS += eap_peap.c
CHIP_CSRCS += eap_tls_common.c
CHIP_CSRCS += eap_tls.c
CHIP_CSRCS += eap_ttls.c
CHIP_CSRCS += eap.c
CHIP_CSRCS += mschapv2.c
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)rsn_supp
CHIP_CSRCS += pmksa_cache.c
CHIP_CSRCS += wpa_ie.c
CHIP_CSRCS += wpa.c
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)utils
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)utils
CHIP_CSRCS += base64.c
CHIP_CSRCS += bitfield.c
CHIP_CSRCS += common.c
CHIP_CSRCS += ext_password.c
CHIP_CSRCS += json.c
CHIP_CSRCS += uuid.c
CHIP_CSRCS += wpa_debug.c
CHIP_CSRCS += wpabuf.c
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)port
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)port$(DELIM)include
CHIP_CSRCS += eloop.c
CHIP_CSRCS += os_xtensa.c
## ESP Supplicant (Espressif's WPA supplicant extension)
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)esp_supplicant$(DELIM)include
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)esp_supplicant$(DELIM)src
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)esp_supplicant$(DELIM)src
CHIP_CSRCS += esp_common.c
CHIP_CSRCS += esp_hostap.c
CHIP_CSRCS += esp_wpa_main.c
CHIP_CSRCS += esp_wpa3.c
CHIP_CSRCS += esp_wpas_glue.c
CHIP_CSRCS += esp_owe.c
CHIP_CSRCS += esp_scan.c
CHIP_CSRCS += esp_wps.c
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)esp_supplicant$(DELIM)src$(DELIM)crypto
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)crypto
CHIP_CSRCS += crypto_mbedtls-bignum.c
CHIP_CSRCS += crypto_mbedtls-ec.c
CHIP_CSRCS += crypto_mbedtls-rsa.c
CHIP_CSRCS += crypto_mbedtls.c
CHIP_CSRCS += tls_mbedtls.c
CHIP_CSRCS += aes-siv.c
endif

View file

@ -58,7 +58,7 @@
#include "esp32s3_rt_timer.h"
#include "esp32s3_rtc.h"
#include "esp32s3_spiflash.h"
#include "esp32s3_wireless.h"
#include "espressif/esp_wireless.h"
#include "esp_bt.h"
#include "esp_log.h"
@ -104,8 +104,8 @@
# define BLE_TASK_EVENT_QUEUE_LEN 8
#endif
#ifdef CONFIG_ESP32S3_BLE_INTERRUPT_SAVE_STATUS
# define NR_IRQSTATE_FLAGS CONFIG_ESP32S3_BLE_INTERRUPT_SAVE_STATUS
#ifdef CONFIG_ESPRESSIF_BLE_INTERRUPT_SAVE_STATUS
# define NR_IRQSTATE_FLAGS CONFIG_ESPRESSIF_BLE_INTERRUPT_SAVE_STATUS
#else
# define NR_IRQSTATE_FLAGS 3
#endif
@ -1845,7 +1845,7 @@ static void coex_wifi_sleep_set_hook(bool sleep)
* Description:
* This is a wrapper for registering a BTDM callback with the coexistence
* scheme. If the Wi-Fi and Bluetooth coexistence feature is enabled
* (CONFIG_ESP32S3_WIFI_BT_COEXIST), it calls the
* (CONFIG_ESPRESSIF_WIFI_BT_COEXIST), it calls the
* coex_schm_register_callback function with COEX_SCHM_CALLBACK_TYPE_BT
* and the provided callback. If the feature is not enabled, it returns 0.
*
@ -1860,7 +1860,7 @@ static void coex_wifi_sleep_set_hook(bool sleep)
static int coex_schm_register_btdm_callback_wrapper(void *callback)
{
#if CONFIG_ESP32S3_WIFI_BT_COEXIST
#if CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_schm_register_callback(COEX_SCHM_CALLBACK_TYPE_BT, callback);
#else
return 0;
@ -1884,7 +1884,7 @@ static int coex_schm_register_btdm_callback_wrapper(void *callback)
static void coex_schm_status_bit_set_wrapper(uint32_t type, uint32_t status)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
coex_schm_status_bit_set(type, status);
#endif
}
@ -1907,7 +1907,7 @@ static void coex_schm_status_bit_set_wrapper(uint32_t type, uint32_t status)
static void coex_schm_status_bit_clear_wrapper(uint32_t type,
uint32_t status)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
coex_schm_status_bit_clear(type, status);
#endif
}
@ -1917,7 +1917,7 @@ static void coex_schm_status_bit_clear_wrapper(uint32_t type,
*
* Description:
* This is a wrapper for coex_schm_interval_get. If the WiFi and Bluetooth
* coexistence feature is enabled (CONFIG_ESP32S3_WIFI_BT_COEXIST), it
* coexistence feature is enabled (CONFIG_ESPRESSIF_WIFI_BT_COEXIST), it
* calls the function and returns its result. If not enabled, it returns 0.
*
* Input Parameters:
@ -1931,7 +1931,7 @@ static void coex_schm_status_bit_clear_wrapper(uint32_t type,
static uint32_t coex_schm_interval_get_wrapper(void)
{
#if CONFIG_ESP32S3_WIFI_BT_COEXIST
#if CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_schm_interval_get();
#else
return 0;
@ -1944,8 +1944,8 @@ static uint32_t coex_schm_interval_get_wrapper(void)
* Description:
* This is a wrapper for coex_schm_curr_period_get. If the WiFi and
* Bluetooth coexistence feature is enabled
* (CONFIG_ESP32S3_WIFI_BT_COEXIST), it calls the function and returns its
* result. If the feature is not enabled, it returns 1.
* (CONFIG_ESPRESSIF_WIFI_BT_COEXIST), it calls the function and returns
* its result. If the feature is not enabled, it returns 1.
*
* Input Parameters:
* None
@ -1958,7 +1958,7 @@ static uint32_t coex_schm_interval_get_wrapper(void)
static uint8_t coex_schm_curr_period_get_wrapper(void)
{
#if CONFIG_ESP32S3_WIFI_BT_COEXIST
#if CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_schm_curr_period_get();
#else
return 1;
@ -1971,8 +1971,8 @@ static uint8_t coex_schm_curr_period_get_wrapper(void)
* Description:
* This is a wrapper for coex_schm_curr_phase_get. If the WiFi and
* Bluetooth coexistence feature is enabled
* (CONFIG_ESP32S3_WIFI_BT_COEXIST), it calls the function and returns its
* result. If the feature is not enabled, it returns NULL.
* (CONFIG_ESPRESSIF_WIFI_BT_COEXIST), it calls the function and returns
* its result. If the feature is not enabled, it returns NULL.
*
* Input Parameters:
* None
@ -1985,7 +1985,7 @@ static uint8_t coex_schm_curr_period_get_wrapper(void)
static void * coex_schm_curr_phase_get_wrapper(void)
{
#if CONFIG_ESP32S3_WIFI_BT_COEXIST
#if CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_schm_curr_phase_get();
#else
return NULL;
@ -2627,7 +2627,7 @@ static esp_err_t btdm_low_power_mode_init(esp_bt_controller_config_t *cfg)
break;
}
#if CONFIG_ESP32S3_WIFI_BT_COEXIST
#if CONFIG_ESPRESSIF_WIFI_BT_COEXIST
coex_update_lpclk_interval();
#endif
@ -2767,7 +2767,7 @@ static void btdm_low_power_mode_deinit(void)
btdm_lpclk_select_src(BTDM_LPCLK_SEL_RTC_SLOW);
btdm_lpclk_set_div(0);
#if CONFIG_ESP32S3_WIFI_BT_COEXIST
#if CONFIG_ESPRESSIF_WIFI_BT_COEXIST
coex_update_lpclk_interval();
#endif
}
@ -3076,8 +3076,8 @@ int esp32s3_bt_controller_init(void)
}
}
cfg->controller_task_stack_size = CONFIG_ESP32S3_BLE_TASK_STACK_SIZE;
cfg->controller_task_prio = CONFIG_ESP32S3_BLE_TASK_PRIORITY;
cfg->controller_task_stack_size = CONFIG_ESPRESSIF_BLE_TASK_STACK_SIZE;
cfg->controller_task_prio = CONFIG_ESPRESSIF_BLE_TASK_PRIORITY;
cfg->controller_task_run_cpu = CONFIG_BT_CTRL_PINNED_TO_CORE;
cfg->magic = ESP_BT_CTRL_CONFIG_MAGIC_VAL;
@ -3113,7 +3113,7 @@ int esp32s3_bt_controller_init(void)
goto error;
}
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
coex_init();
#endif
@ -3213,7 +3213,7 @@ int esp32s3_bt_controller_enable(esp_bt_mode_t mode)
esp_phy_enable(PHY_MODEM_BT);
g_lp_stat.phy_enabled = 1;
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
coex_enable();
#endif
@ -3290,7 +3290,7 @@ error:
}
#endif
#if CONFIG_ESP32S3_WIFI_BT_COEXIST
#if CONFIG_ESPRESSIF_WIFI_BT_COEXIST
coex_disable();
#endif
if (g_lp_stat.phy_enabled)
@ -3334,7 +3334,7 @@ int esp32s3_bt_controller_disable(void)
async_wakeup_request_end(BTDM_ASYNC_WAKEUP_SRC_DISA);
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
coex_disable();
#endif

View file

@ -109,7 +109,7 @@
#define ESP32S3_MAX_PRIORITY 5
#define ESP32S3_PRIO_INDEX(p) ((p) - ESP32S3_MIN_PRIORITY)
#ifdef CONFIG_ESP32S3_WIFI
#ifdef CONFIG_ESPRESSIF_WIFI
# define ESP32S3_WIFI_RESERVE_INT (1 << ESP32S3_CPUINT_MAC)
#else
# define ESP32S3_WIFI_RESERVE_INT 0
@ -485,7 +485,7 @@ void up_irqinitialize(void)
g_irqmap[XTENSA_IRQ_SWINT] = IRQ_MKMAP(0, ESP32S3_CPUINT_SOFTWARE1);
g_irqmap[XTENSA_IRQ_SWINT] = IRQ_MKMAP(1, ESP32S3_CPUINT_SOFTWARE1);
#ifdef CONFIG_ESP32S3_WIFI
#ifdef CONFIG_ESPRESSIF_WIFI
g_irqmap[ESP32S3_IRQ_MAC] = IRQ_MKMAP(0, ESP32S3_CPUINT_MAC);
g_irqmap[ESP32S3_IRQ_PWR] = IRQ_MKMAP(0, ESP32S3_CPUINT_PWR);
#endif
@ -496,7 +496,7 @@ void up_irqinitialize(void)
/* Reserve CPU0 interrupt for some special drivers */
#ifdef CONFIG_ESP32S3_WIFI
#ifdef CONFIG_ESPRESSIF_WIFI
g_cpu0_intmap[ESP32S3_CPUINT_MAC] = CPUINT_ASSIGN(ESP32S3_IRQ_MAC);
g_cpu0_intmap[ESP32S3_CPUINT_PWR] = CPUINT_ASSIGN(ESP32S3_IRQ_PWR);
xtensa_enable_cpuint(&g_intenable[0], 1 << ESP32S3_CPUINT_MAC);

View file

@ -60,19 +60,19 @@
#include "hardware/esp32s3_syscon.h"
#include "hardware/esp32s3_soc.h"
#include "esp32s3_irq.h"
#include "esp32s3_wireless.h"
#include "espressif/esp_wireless.h"
#include "esp32s3_wifi_adapter.h"
#include "esp32s3_rt_timer.h"
#include "esp32s3_wifi_utils.h"
#include "esp32s3_wlan.h"
#include "espressif/esp_wifi_utils.h"
#include "espressif/esp_wlan.h"
#ifdef CONFIG_PM
# include "esp32s3_pm.h"
#endif
#ifdef CONFIG_ESP32S3_BLE
#ifdef CONFIG_ESPRESSIF_BLE
# include "esp32s3_ble_adapter.h"
# ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
# ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
# include "private/esp_coexist_internal.h"
# endif
#endif
@ -94,7 +94,7 @@
#define PHY_RF_MASK ((1 << PHY_BT_MODULE) | (1 << PHY_WIFI_MODULE))
#define WIFI_CONNECT_TIMEOUT CONFIG_ESP32S3_WIFI_CONNECT_TIMEOUT
#define WIFI_CONNECT_TIMEOUT CONFIG_ESPRESSIF_WIFI_CONNECT_TIMEOUT
#define TIMER_INITIALIZED_VAL (0x5aa5a55a)
@ -115,11 +115,11 @@
/* CONFIG_POWER_SAVE_MODEM */
#if defined(CONFIG_ESP32S3_POWER_SAVE_MIN_MODEM)
#if defined(CONFIG_ESPRESSIF_POWER_SAVE_MIN_MODEM)
# define DEFAULT_PS_MODE WIFI_PS_MIN_MODEM
#elif defined(CONFIG_ESP32S3_POWER_SAVE_MAX_MODEM)
#elif defined(CONFIG_ESPRESSIF_POWER_SAVE_MAX_MODEM)
# define DEFAULT_PS_MODE WIFI_PS_MAX_MODEM
#elif defined(CONFIG_ESP32S3_POWER_SAVE_NONE)
#elif defined(CONFIG_ESPRESSIF_POWER_SAVE_NONE)
# define DEFAULT_PS_MODE WIFI_PS_NONE
#else
# define DEFAULT_PS_MODE WIFI_PS_NONE
@ -197,11 +197,11 @@ struct nvs_adpt
* Private Function Prototypes
****************************************************************************/
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
static int semphr_take_from_isr_wrapper(void *semphr, void *hptw);
static int semphr_give_from_isr_wrapper(void *semphr, void *hptw);
static int is_in_isr_wrapper(void);
#endif /* CONFIG_ESP32S3_WIFI_BT_COEXIST */
#endif /* CONFIG_ESPRESSIF_WIFI_BT_COEXIST */
static bool wifi_env_is_chip(void);
static void wifi_set_intr(int32_t cpu_no, uint32_t intr_source,
@ -365,7 +365,7 @@ static mutex_t g_wifiexcl_lock = NXMUTEX_INITIALIZER;
static int g_wifi_ref;
#ifdef ESP32S3_WLAN_HAS_STA
#ifdef ESPRESSIF_WLAN_HAS_STA
/* If reconnect automatically */
@ -387,9 +387,9 @@ static wifi_txdone_cb_t g_sta_txdone_cb;
static wifi_config_t g_sta_wifi_cfg;
#endif /* ESP32S3_WLAN_HAS_STA */
#endif /* ESPRESSIF_WLAN_HAS_STA */
#ifdef ESP32S3_WLAN_HAS_SOFTAP
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
/* If Wi-Fi SoftAP starts */
@ -403,7 +403,7 @@ static wifi_txdone_cb_t g_softap_txdone_cb;
static wifi_config_t g_softap_wifi_cfg;
#endif /* ESP32S3_WLAN_HAS_SOFTAP */
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
/* Device specific lock */
@ -415,7 +415,7 @@ static spinlock_t g_lock;
/* Wi-Fi and BT coexistence OS adapter data */
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
coex_adapter_funcs_t g_coex_adapter_funcs =
{
._version = COEX_ADAPTER_VERSION,
@ -436,7 +436,7 @@ coex_adapter_funcs_t g_coex_adapter_funcs =
._timer_arm_us = esp_timer_arm_us,
._magic = COEX_ADAPTER_MAGIC,
};
#endif /* CONFIG_ESP32S3_WIFI_BT_COEXIST */
#endif /* CONFIG_ESPRESSIF_WIFI_BT_COEXIST */
/* Wi-Fi OS adapter data */
@ -498,7 +498,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs =
._wifi_apb80m_release = wifi_apb80m_release,
._phy_disable = esp_phy_disable_wrapper,
._phy_enable = esp_phy_enable_wrapper,
._phy_update_country_info = esp32s3_phy_update_country_info,
._phy_update_country_info = esp_phy_update_country_info,
._read_mac = esp_wifi_read_mac,
._timer_arm = esp_timer_arm,
._timer_disarm = esp_timer_disarm,
@ -2046,7 +2046,7 @@ static int esp_event_id_map(int event_id)
id = WIFI_ADPT_EVT_SCAN_DONE;
break;
#ifdef ESP32S3_WLAN_HAS_STA
#ifdef ESPRESSIF_WLAN_HAS_STA
case WIFI_EVENT_STA_START:
id = WIFI_ADPT_EVT_STA_START;
break;
@ -2066,9 +2066,9 @@ static int esp_event_id_map(int event_id)
case WIFI_EVENT_STA_STOP:
id = WIFI_ADPT_EVT_STA_STOP;
break;
#endif /* ESP32S3_WLAN_HAS_STA */
#endif /* ESPRESSIF_WLAN_HAS_STA */
#ifdef ESP32S3_WLAN_HAS_SOFTAP
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
case WIFI_EVENT_AP_START:
id = WIFI_ADPT_EVT_AP_START;
break;
@ -2084,7 +2084,7 @@ static int esp_event_id_map(int event_id)
case WIFI_EVENT_AP_STADISCONNECTED:
id = WIFI_ADPT_EVT_AP_STADISCONNECTED;
break;
#endif /* ESP32S3_WLAN_HAS_SOFTAP */
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
default:
return -1;
@ -2140,13 +2140,13 @@ static void esp_evt_work_cb(void *arg)
esp_wifi_scan_event_parse();
break;
#ifdef ESP32S3_WLAN_HAS_STA
#ifdef ESPRESSIF_WLAN_HAS_STA
case WIFI_ADPT_EVT_STA_START:
wlinfo("Wi-Fi sta start\n");
g_sta_connected = false;
#ifdef CONFIG_ESP32S3_BLE
#ifdef CONFIG_ESPRESSIF_BLE
if (esp32s3_bt_controller_get_status() !=
ESP_BT_CONTROLLER_STATUS_IDLE)
{
@ -2178,7 +2178,7 @@ static void esp_evt_work_cb(void *arg)
case WIFI_ADPT_EVT_STA_CONNECT:
wlinfo("Wi-Fi sta connect\n");
g_sta_connected = true;
ret = esp32s3_wlan_sta_set_linkstatus(true);
ret = esp_wlan_sta_set_linkstatus(true);
if (ret < 0)
{
wlerr("ERROR: Failed to set Wi-Fi station link status\n");
@ -2189,7 +2189,7 @@ static void esp_evt_work_cb(void *arg)
case WIFI_ADPT_EVT_STA_DISCONNECT:
wlinfo("Wi-Fi sta disconnect\n");
g_sta_connected = false;
ret = esp32s3_wlan_sta_set_linkstatus(false);
ret = esp_wlan_sta_set_linkstatus(false);
if (ret < 0)
{
wlerr("ERROR: Failed to set Wi-Fi station link status\n");
@ -2209,13 +2209,13 @@ static void esp_evt_work_cb(void *arg)
wlinfo("Wi-Fi sta stop\n");
g_sta_connected = false;
break;
#endif /* ESP32S3_WLAN_HAS_STA */
#endif /* ESPRESSIF_WLAN_HAS_STA */
#ifdef ESP32S3_WLAN_HAS_SOFTAP
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
case WIFI_ADPT_EVT_AP_START:
wlinfo("INFO: Wi-Fi softap start\n");
#ifdef CONFIG_ESP32S3_BLE
#ifdef CONFIG_ESPRESSIF_BLE
if (esp32s3_bt_controller_get_status() !=
ESP_BT_CONTROLLER_STATUS_IDLE)
{
@ -2255,7 +2255,7 @@ static void esp_evt_work_cb(void *arg)
case WIFI_ADPT_EVT_AP_STADISCONNECTED:
wlinfo("INFO: Wi-Fi station leave\n");
break;
#endif /* ESP32S3_WLAN_HAS_SOFTAP */
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
default:
break;
}
@ -2281,7 +2281,7 @@ static void esp_evt_work_cb(void *arg)
}
}
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
/****************************************************************************
* Name: semphr_take_from_isr_wrapper
@ -2346,7 +2346,7 @@ static int IRAM_ATTR is_in_isr_wrapper(void)
return up_interrupt_context();
}
#endif /* CONFIG_ESP32S3_WIFI_BT_COEXIST */
#endif /* CONFIG_ESPRESSIF_WIFI_BT_COEXIST */
/****************************************************************************
* Name: wifi_env_is_chip
@ -3655,7 +3655,7 @@ static void esp_wifi_delete_queue(void *queue)
static int coex_init_wrapper(void)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_init();
#else
return 0;
@ -3678,7 +3678,7 @@ static int coex_init_wrapper(void)
static void coex_deinit_wrapper(void)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
coex_deinit();
#endif
}
@ -3700,7 +3700,7 @@ static void coex_deinit_wrapper(void)
static int coex_enable_wrapper(void)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_enable();
#else
return 0;
@ -3723,7 +3723,7 @@ static int coex_enable_wrapper(void)
static void coex_disable_wrapper(void)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
coex_disable();
#endif
}
@ -3745,7 +3745,7 @@ static void coex_disable_wrapper(void)
static IRAM_ATTR uint32_t coex_status_get_wrapper(void)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_status_get();
#else
return 0;
@ -3772,7 +3772,7 @@ static IRAM_ATTR uint32_t coex_status_get_wrapper(void)
static int32_t coex_wifi_request_wrapper(uint32_t event, uint32_t latency,
uint32_t duration)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_wifi_request(event, latency, duration);
#else
return 0;
@ -3796,7 +3796,7 @@ static int32_t coex_wifi_request_wrapper(uint32_t event, uint32_t latency,
static IRAM_ATTR int32_t coex_wifi_release_wrapper(uint32_t event)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_wifi_release(event);
#else
return 0;
@ -3821,7 +3821,7 @@ static IRAM_ATTR int32_t coex_wifi_release_wrapper(uint32_t event)
static int coex_wifi_channel_set_wrapper(uint8_t primary, uint8_t secondary)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_wifi_channel_set(primary, secondary);
#else
return 0;
@ -3847,7 +3847,7 @@ static int coex_wifi_channel_set_wrapper(uint8_t primary, uint8_t secondary)
static int coex_event_duration_get_wrapper(uint32_t event,
uint32_t *duration)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_event_duration_get(event, duration);
#else
return 0;
@ -3872,7 +3872,7 @@ static int coex_event_duration_get_wrapper(uint32_t event,
static int coex_pti_get_wrapper(uint32_t event, uint8_t *pti)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_pti_get(event, pti);
#else
return 0;
@ -3897,7 +3897,7 @@ static int coex_pti_get_wrapper(uint32_t event, uint8_t *pti)
static void coex_schm_status_bit_clear_wrapper(uint32_t type,
uint32_t status)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
coex_schm_status_bit_clear(type, status);
#endif
}
@ -3919,7 +3919,7 @@ static void coex_schm_status_bit_clear_wrapper(uint32_t type,
static void coex_schm_status_bit_set_wrapper(uint32_t type, uint32_t status)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
coex_schm_status_bit_set(type, status);
#endif
}
@ -3941,7 +3941,7 @@ static void coex_schm_status_bit_set_wrapper(uint32_t type, uint32_t status)
static IRAM_ATTR int coex_schm_interval_set_wrapper(uint32_t interval)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_schm_interval_set(interval);
#else
return 0;
@ -3964,7 +3964,7 @@ static IRAM_ATTR int coex_schm_interval_set_wrapper(uint32_t interval)
static uint32_t coex_schm_interval_get_wrapper(void)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_schm_interval_get();
#else
return 0;
@ -3987,7 +3987,7 @@ static uint32_t coex_schm_interval_get_wrapper(void)
static uint8_t coex_schm_curr_period_get_wrapper(void)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_schm_curr_period_get();
#else
return 0;
@ -4010,7 +4010,7 @@ static uint8_t coex_schm_curr_period_get_wrapper(void)
static void *coex_schm_curr_phase_get_wrapper(void)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_schm_curr_phase_get();
#else
return NULL;
@ -4034,7 +4034,7 @@ static void *coex_schm_curr_phase_get_wrapper(void)
static int coex_register_start_cb_wrapper(int (* cb)(void))
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_register_start_cb(cb);
#else
return 0;
@ -4058,7 +4058,7 @@ static int coex_register_start_cb_wrapper(int (* cb)(void))
static int coex_schm_process_restart_wrapper(void)
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_schm_process_restart();
#else
return 0;
@ -4083,7 +4083,7 @@ static int coex_schm_process_restart_wrapper(void)
static int coex_schm_register_cb_wrapper(int type, int(*cb)(int))
{
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
return coex_schm_register_callback(type, cb);
#else
return 0;
@ -4185,7 +4185,7 @@ static unsigned long esp_random_ulong(void)
static IRAM_ATTR void esp_wifi_tx_done_cb(uint8_t ifidx, uint8_t *data,
uint16_t *len, bool txstatus)
{
#ifdef ESP32S3_WLAN_HAS_STA
#ifdef ESPRESSIF_WLAN_HAS_STA
if (ifidx == ESP_IF_WIFI_STA)
{
if (g_sta_txdone_cb)
@ -4194,9 +4194,9 @@ static IRAM_ATTR void esp_wifi_tx_done_cb(uint8_t ifidx, uint8_t *data,
}
}
else
#endif /* ESP32S3_WLAN_HAS_STA */
#endif /* ESPRESSIF_WLAN_HAS_STA */
#ifdef ESP32S3_WLAN_HAS_SOFTAP
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
if (ifidx == ESP_IF_WIFI_AP)
{
if (g_softap_txdone_cb)
@ -4205,13 +4205,13 @@ static IRAM_ATTR void esp_wifi_tx_done_cb(uint8_t ifidx, uint8_t *data,
}
}
else
#endif /* ESP32S3_WLAN_HAS_SOFTAP */
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
{
wlerr("ifidx=%d is error\n", ifidx);
}
}
#ifdef ESP32S3_WLAN_HAS_STA
#ifdef ESPRESSIF_WLAN_HAS_STA
/****************************************************************************
* Name: esp_wifi_auth_trans
@ -4313,7 +4313,7 @@ static int esp_wifi_cipher_trans(uint32_t wifi_cipher)
return cipher_mode;
}
#endif /* ESP32S3_WLAN_HAS_STA */
#endif /* ESPRESSIF_WLAN_HAS_STA */
/****************************************************************************
* Name: esp_freq_to_channel
@ -4649,28 +4649,28 @@ int esp_wifi_adapter_init(void)
wifi_cfg.nvs_enable = 0;
#ifdef CONFIG_ESP32S3_WIFI_TX_AMPDU
#ifdef CONFIG_ESPRESSIF_WIFI_TX_AMPDU
wifi_cfg.ampdu_tx_enable = 1;
#else
wifi_cfg.ampdu_tx_enable = 0;
#endif
#ifdef CONFIG_ESP32S3_WIFI_RX_AMPDU
#ifdef CONFIG_ESPRESSIF_WIFI_RX_AMPDU
wifi_cfg.ampdu_rx_enable = 1;
#else
wifi_cfg.ampdu_rx_enable = 0;
#endif
#ifdef CONFIG_ESP32S3_WIFI_STA_DISCONNECT_PM
#ifdef CONFIG_ESPRESSIF_WIFI_STA_DISCONNECT_PM
wifi_cfg.sta_disconnected_pm = true;
#else
wifi_cfg.sta_disconnected_pm = false;
#endif
wifi_cfg.rx_ba_win = CONFIG_ESP32S3_WIFI_RXBA_AMPDU_WZ;
wifi_cfg.static_rx_buf_num = CONFIG_ESP32S3_WIFI_STATIC_RXBUF_NUM;
wifi_cfg.dynamic_rx_buf_num = CONFIG_ESP32S3_WIFI_DYNAMIC_RXBUF_NUM;
wifi_cfg.dynamic_tx_buf_num = CONFIG_ESP32S3_WIFI_DYNAMIC_TXBUF_NUM;
wifi_cfg.rx_ba_win = CONFIG_ESPRESSIF_WIFI_RXBA_AMPDU_WZ;
wifi_cfg.static_rx_buf_num = CONFIG_ESPRESSIF_WIFI_STATIC_RXBUF_NUM;
wifi_cfg.dynamic_rx_buf_num = CONFIG_ESPRESSIF_WIFI_DYNAMIC_RXBUF_NUM;
wifi_cfg.dynamic_tx_buf_num = CONFIG_ESPRESSIF_WIFI_DYNAMIC_TXBUF_NUM;
ret = esp_wifi_init(&wifi_cfg);
if (ret)
@ -4708,7 +4708,7 @@ errout_init_wifi:
* Station functions
****************************************************************************/
#ifdef ESP32S3_WLAN_HAS_STA
#ifdef ESPRESSIF_WLAN_HAS_STA
/****************************************************************************
* Name: esp_wifi_sta_start
@ -4738,13 +4738,13 @@ int esp_wifi_sta_start(void)
wlinfo("Failed to stop Wi-Fi ret=%d\n", ret);
}
#ifdef ESP32S3_WLAN_HAS_SOFTAP
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
if (g_softap_started)
{
mode = WIFI_MODE_APSTA;
}
else
#endif /* ESP32S3_WLAN_HAS_SOFTAP */
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
{
mode = WIFI_MODE_STA;
}
@ -4803,7 +4803,7 @@ int esp_wifi_sta_stop(void)
g_sta_started = false;
#ifdef ESP32S3_WLAN_HAS_SOFTAP
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
if (g_softap_started)
{
ret = esp_wifi_set_mode(WIFI_MODE_AP);
@ -4822,13 +4822,13 @@ int esp_wifi_sta_stop(void)
goto errout;
}
}
#endif /* ESP32S3_WLAN_HAS_SOFTAP */
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
wlinfo("OK to stop Wi-Fi station\n");
#ifdef ESP32S3_WLAN_HAS_SOFTAP
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
errout:
#endif /* ESP32S3_WLAN_HAS_SOFTAP */
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
esp_wifi_lock(false);
return ret;
@ -5703,7 +5703,7 @@ int esp_wifi_sta_bitrate(struct iwreq *iwr, bool set)
return OK;
}
#endif /* ESP32S3_WLAN_HAS_STA */
#endif /* ESPRESSIF_WLAN_HAS_STA */
/****************************************************************************
* Name: esp_wifi_sta_get_txpower
@ -5906,7 +5906,7 @@ int esp_wifi_sta_country(struct iwreq *iwr, bool set)
return OK;
}
#ifdef ESP32S3_WLAN_HAS_STA
#ifdef ESPRESSIF_WLAN_HAS_STA
/****************************************************************************
* Name: esp_wifi_sta_rssi
@ -5953,13 +5953,13 @@ int esp_wifi_sta_rssi(struct iwreq *iwr, bool set)
return OK;
}
#endif /* ESP32S3_WLAN_HAS_STA */
#endif /* ESPRESSIF_WLAN_HAS_STA */
/****************************************************************************
* SoftAP functions
****************************************************************************/
#ifdef ESP32S3_WLAN_HAS_SOFTAP
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
/****************************************************************************
* Name: esp_wifi_softap_start
@ -5989,13 +5989,13 @@ int esp_wifi_softap_start(void)
wlinfo("Failed to stop Wi-Fi ret=%d\n", ret);
}
#ifdef ESP32S3_WLAN_HAS_STA
#ifdef ESPRESSIF_WLAN_HAS_STA
if (g_sta_started)
{
mode = WIFI_MODE_APSTA;
}
else
#endif /* ESP32S3_WLAN_HAS_STA */
#endif /* ESPRESSIF_WLAN_HAS_STA */
{
mode = WIFI_MODE_AP;
}
@ -6054,7 +6054,7 @@ int esp_wifi_softap_stop(void)
g_softap_started = false;
#ifdef ESP32S3_WLAN_HAS_STA
#ifdef ESPRESSIF_WLAN_HAS_STA
if (g_sta_started)
{
ret = esp_wifi_set_mode(WIFI_MODE_STA);
@ -6073,13 +6073,13 @@ int esp_wifi_softap_stop(void)
goto errout;
}
}
#endif /* ESP32S3_WLAN_HAS_STA */
#endif /* ESPRESSIF_WLAN_HAS_STA */
wlinfo("OK to stop Wi-Fi SoftAP\n");
#ifdef ESP32S3_WLAN_HAS_STA
#ifdef ESPRESSIF_WLAN_HAS_STA
errout:
#endif /* ESP32S3_WLAN_HAS_STA */
#endif /* ESPRESSIF_WLAN_HAS_STA */
esp_wifi_lock(false);
return ret;
@ -6718,10 +6718,10 @@ int esp_wifi_softap_rssi(struct iwreq *iwr, bool set)
return -ENOSYS;
}
#endif /* ESP32S3_WLAN_HAS_SOFTAP */
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
/****************************************************************************
* Name: esp32s3_wifi_bt_coexist_init
* Name: esp_wifi_bt_coexist_init
*
* Description:
* Initialize ESP32-S3 Wi-Fi and BT coexistance module.
@ -6735,15 +6735,15 @@ int esp_wifi_softap_rssi(struct iwreq *iwr, bool set)
*
****************************************************************************/
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
int esp32s3_wifi_bt_coexist_init(void)
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
int esp_wifi_bt_coexist_init(void)
{
esp_coex_adapter_register(&g_coex_adapter_funcs);
coex_pre_init();
return 0;
}
#endif /* CONFIG_ESP32S3_WIFI_BT_COEXIST */
#endif /* CONFIG_ESPRESSIF_WIFI_BT_COEXIST */
/****************************************************************************
* Name: esp_wifi_stop_callback

View file

@ -45,20 +45,20 @@ extern "C"
* Pre-processor Definitions
****************************************************************************/
#if defined(CONFIG_ESP32S3_WIFI_STATION)
# define ESP32S3_WLAN_HAS_STA
# define ESP32S3_WLAN_STA_DEVNO 0
# define ESP32S3_WLAN_DEVS 1
#elif defined(CONFIG_ESP32S3_WIFI_SOFTAP)
# define ESP32S3_WLAN_HAS_SOFTAP
# define ESP32S3_WLAN_SOFTAP_DEVNO 0
# define ESP32S3_WLAN_DEVS 1
#elif defined(CONFIG_ESP32S3_WIFI_STATION_SOFTAP)
# define ESP32S3_WLAN_HAS_STA
# define ESP32S3_WLAN_HAS_SOFTAP
# define ESP32S3_WLAN_STA_DEVNO 0
# define ESP32S3_WLAN_SOFTAP_DEVNO 1
# define ESP32S3_WLAN_DEVS 2
#if defined(CONFIG_ESPRESSIF_WIFI_STATION)
# define ESPRESSIF_WLAN_HAS_STA
# define ESPRESSIF_WLAN_STA_DEVNO 0
# define ESPRESSIF_WLAN_DEVS 1
#elif defined(CONFIG_ESPRESSIF_WIFI_SOFTAP)
# define ESPRESSIF_WLAN_HAS_SOFTAP
# define ESPRESSIF_WLAN_SOFTAP_DEVNO 0
# define ESPRESSIF_WLAN_DEVS 1
#elif defined(CONFIG_ESPRESSIF_WIFI_STATION_SOFTAP)
# define ESPRESSIF_WLAN_HAS_STA
# define ESPRESSIF_WLAN_HAS_SOFTAP
# define ESPRESSIF_WLAN_STA_DEVNO 0
# define ESPRESSIF_WLAN_SOFTAP_DEVNO 1
# define ESPRESSIF_WLAN_DEVS 2
#endif
#define SSID_MAX_LEN (32)
@ -148,7 +148,7 @@ void esp_wifi_free_eb(void *eb);
int esp_wifi_notify_subscribe(pid_t pid, struct sigevent *event);
#ifdef ESP32S3_WLAN_HAS_STA
#ifdef ESPRESSIF_WLAN_HAS_STA
/****************************************************************************
* Name: esp_wifi_sta_start
@ -484,9 +484,9 @@ int esp_wifi_sta_country(struct iwreq *iwr, bool set);
****************************************************************************/
int esp_wifi_sta_rssi(struct iwreq *iwr, bool set);
#endif /* ESP32S3_WLAN_HAS_STA */
#endif /* ESPRESSIF_WLAN_HAS_STA */
#ifdef ESP32S3_WLAN_HAS_SOFTAP
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
/****************************************************************************
* Name: esp_wifi_softap_start
@ -822,10 +822,10 @@ int esp_wifi_softap_country(struct iwreq *iwr, bool set);
****************************************************************************/
int esp_wifi_softap_rssi(struct iwreq *iwr, bool set);
#endif /* ESP32S3_WLAN_HAS_SOFTAP */
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
/****************************************************************************
* Name: esp32s3_wifi_bt_coexist_init
* Name: esp_wifi_bt_coexist_init
*
* Description:
* Initialize ESP32-S3 Wi-Fi and BT coexistance module.
@ -839,8 +839,8 @@ int esp_wifi_softap_rssi(struct iwreq *iwr, bool set);
*
****************************************************************************/
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
int esp32s3_wifi_bt_coexist_init(void);
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
int esp_wifi_bt_coexist_init(void);
#endif
/****************************************************************************

View file

@ -1,574 +0,0 @@
/****************************************************************************
* arch/xtensa/src/esp32s3/esp32s3_wifi_utils.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <assert.h>
#include <debug.h>
#include <netinet/arp.h>
#include <sys/param.h>
#include <nuttx/kmalloc.h>
#include <nuttx/wireless/wireless.h>
#include "esp32s3_wifi_adapter.h"
#include "esp32s3_wifi_utils.h"
#include "esp32s3_wireless.h"
#include "esp_log.h"
#include "esp_mac.h"
#include "esp_private/phy.h"
#include "esp_private/wifi.h"
#include "esp_random.h"
#include "esp_timer.h"
#include "esp_wpa.h"
#include "rom/ets_sys.h"
#include "soc/soc_caps.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Helper to get iw_event size */
#define ESP_IW_EVENT_SIZE(field) \
(offsetof(struct iw_event, u) + sizeof(((union iwreq_data *)0)->field))
#ifdef CONFIG_ESP32S3_WIFI_SCAN_RESULT_SIZE
# define WIFI_SCAN_RESULT_SIZE CONFIG_ESP32S3_WIFI_SCAN_RESULT_SIZE
#else
# define WIFI_SCAN_RESULT_SIZE (4096)
#endif
#define SCAN_TIME_SEC (5)
/* Maximum number of channels for Wi-Fi 2.4Ghz */
#define CHANNEL_MAX_NUM (14)
/****************************************************************************
* Private Types
****************************************************************************/
enum scan_status_e
{
ESP_SCAN_DISABLED = 0,
ESP_SCAN_RUN,
ESP_SCAN_DONE
};
/* Wi-Fi scan result information */
struct wifi_scan_result
{
enum scan_status_e scan_status; /* Scan status */
sem_t scan_signal; /* Scan notification signal */
uint8_t *scan_result; /* Temp buffer that holds results */
unsigned int scan_result_size; /* Current size of temp buffer */
};
/****************************************************************************
* Private Data
****************************************************************************/
static struct wifi_scan_result g_scan_priv =
{
.scan_signal = SEM_INITIALIZER(0),
};
static uint8_t g_channel_num;
static uint8_t g_channel_list[CHANNEL_MAX_NUM];
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: esp_wifi_start_scan
*
* Description:
* Scan all available APs.
*
* Input Parameters:
* iwr - The argument of the ioctl cmd
*
* Returned Value:
* OK on success (positive non-zero values are cmd-specific)
* Negated errno returned on failure.
*
****************************************************************************/
int esp_wifi_start_scan(struct iwreq *iwr)
{
struct wifi_scan_result *priv = &g_scan_priv;
wifi_scan_config_t *config = NULL;
struct iw_scan_req *req;
int ret = 0;
int i;
uint8_t target_mac[MAC_LEN];
uint8_t target_ssid[SSID_MAX_LEN + 1];
memset(target_ssid, 0x0, sizeof(SSID_MAX_LEN + 1));
if (iwr == NULL)
{
wlerr("ERROR: Invalid ioctl cmd.\n");
return -EINVAL;
}
if (g_scan_priv.scan_status != ESP_SCAN_DISABLED)
{
return OK;
}
config = kmm_calloc(1, sizeof(wifi_scan_config_t));
if (config == NULL)
{
wlerr("ERROR: Cannot allocate result buffer\n");
return -ENOMEM;
}
g_channel_num = 0;
memset(g_channel_list, 0x0, CHANNEL_MAX_NUM);
if (iwr->u.data.pointer &&
iwr->u.data.length >= sizeof(struct iw_scan_req))
{
req = (struct iw_scan_req *)iwr->u.data.pointer;
config->scan_type = (req->scan_type == IW_SCAN_TYPE_ACTIVE ?
WIFI_SCAN_TYPE_ACTIVE : WIFI_SCAN_TYPE_PASSIVE);
if (iwr->u.data.flags & IW_SCAN_THIS_ESSID &&
req->essid_len < sizeof(target_ssid))
{
/* Scan specific ESSID */
config->show_hidden = true;
config->bssid = NULL;
memcpy(&target_ssid[0], req->essid, req->essid_len);
config->ssid = &target_ssid[0];
config->ssid[req->essid_len] = '\0';
}
if (iwr->u.data.flags & IW_SCAN_THIS_FREQ &&
req->num_channels > 0)
{
/* Scan specific channels */
DEBUGASSERT(req->num_channels <= CHANNEL_MAX_NUM);
g_channel_num = req->num_channels;
if (req->num_channels == 1)
{
config->channel = req->channel_list[0].m;
}
else
{
for (i = 0; i < req->num_channels; i++)
{
g_channel_list[i] = req->channel_list[i].m;
}
}
}
memset(target_mac, 0xff, MAC_LEN);
if (memcmp(req->bssid.sa_data, target_mac, MAC_LEN) != 0)
{
/* Scan specific bssid */
memcpy(target_mac, req->bssid.sa_data, MAC_LEN);
config->bssid = &target_mac[0];
}
}
else
{
/* Default scan parameters */
wlinfo("INFO: Use default scan parameters\n");
config->scan_type = WIFI_SCAN_TYPE_ACTIVE; /* Active scan */
}
esp_wifi_start();
ret = esp_wifi_scan_start(config, false);
if (ret != OK)
{
wlerr("ERROR: Scan error, ret: %d\n", ret);
ret = ERROR;
}
else
{
/* Allocate buffer to store scan result */
if (priv->scan_result == NULL)
{
priv->scan_result = kmm_malloc(WIFI_SCAN_RESULT_SIZE);
if (priv->scan_result == NULL)
{
wlerr("ERROR: Cannot allocate result buffer\n");
ret = -ENOMEM;
}
else
{
memset(priv->scan_result, 0x0, WIFI_SCAN_RESULT_SIZE);
}
}
}
if (config)
{
kmm_free(config);
config = NULL;
}
if (ret == OK)
{
wlinfo("INFO: start scan\n");
g_scan_priv.scan_status = ESP_SCAN_RUN;
}
return ret;
}
/****************************************************************************
* Name: esp_wifi_get_scan_results
*
* Description:
* Get scan result
*
* Input Parameters:
* iwr - The argument of the ioctl cmd
*
* Returned Value:
* OK on success (positive non-zero values are cmd-specific)
* Negated errno returned on failure.
*
****************************************************************************/
int esp_wifi_get_scan_results(struct iwreq *iwr)
{
int ret = OK;
static bool scan_block = false;
struct wifi_scan_result *priv = &g_scan_priv;
if (g_scan_priv.scan_status == ESP_SCAN_RUN)
{
irqstate_t irqstate = enter_critical_section();
if (!scan_block)
{
scan_block = true;
leave_critical_section(irqstate);
nxsem_tickwait(&priv->scan_signal, SEC2TICK(SCAN_TIME_SEC));
scan_block = false;
}
else
{
leave_critical_section(irqstate);
ret = -EINVAL;
goto exit_failed;
}
}
else if (g_scan_priv.scan_status == ESP_SCAN_DISABLED)
{
ret = -EINVAL;
goto exit_failed;
}
if ((iwr == NULL) || (g_scan_priv.scan_status != ESP_SCAN_DONE))
{
ret = -EINVAL;
goto exit_failed;
}
if (priv->scan_result == NULL)
{
/* Result have already been requested */
ret = OK;
iwr->u.data.length = 0;
goto exit_failed;
}
if (priv->scan_result_size <= 0)
{
ret = OK;
iwr->u.data.length = 0;
goto exit_free_buffer;
}
if (iwr->u.data.pointer == NULL ||
iwr->u.data.length < priv->scan_result_size)
{
/* Stat request, return scan_result_size */
ret = -E2BIG;
iwr->u.data.pointer = NULL;
iwr->u.data.length = priv->scan_result_size;
return ret;
}
/* Copy result to user buffer */
if (iwr->u.data.length > priv->scan_result_size)
{
iwr->u.data.length = priv->scan_result_size;
}
memcpy(iwr->u.data.pointer, priv->scan_result, iwr->u.data.length);
exit_free_buffer:
/* Free scan result buffer */
kmm_free(priv->scan_result);
priv->scan_result = NULL;
priv->scan_result_size = 0;
g_scan_priv.scan_status = ESP_SCAN_DISABLED;
exit_failed:
if (ret < 0)
{
iwr->u.data.length = 0;
}
return ret;
}
/****************************************************************************
* Name: esp_wifi_scan_event_parse
*
* Description:
* Parse scan information
*
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
void esp_wifi_scan_event_parse(void)
{
struct wifi_scan_result *priv = &g_scan_priv;
wifi_ap_record_t *ap_list_buffer = NULL;
uint16_t bss_total = 0;
uint8_t bss_count = 0;
bool parse_done = false;
if (priv->scan_status != ESP_SCAN_RUN)
{
return;
}
esp_wifi_scan_get_ap_num(&bss_total);
if (bss_total == 0)
{
priv->scan_status = ESP_SCAN_DONE;
wlinfo("INFO: None AP is scanned\n");
nxsem_post(&priv->scan_signal);
return;
}
ap_list_buffer = kmm_calloc(bss_total, sizeof(wifi_ap_record_t));
if (ap_list_buffer == NULL)
{
priv->scan_status = ESP_SCAN_DONE;
wlerr("ERROR: Failed to calloc buffer to print scan results");
nxsem_post(&priv->scan_signal);
return;
}
if (esp_wifi_scan_get_ap_records(&bss_total,
(wifi_ap_record_t *)ap_list_buffer) == OK)
{
struct iw_event *iwe;
unsigned int result_size;
size_t essid_len;
size_t essid_len_aligned;
bool is_target_channel = true;
int i;
for (bss_count = 0; bss_count < bss_total; bss_count++)
{
if (g_channel_num > 1)
{
is_target_channel = false;
for (i = 0; i < g_channel_num; i++)
{
if (g_channel_list[i] == ap_list_buffer[bss_count].primary)
{
is_target_channel = true;
break;
}
}
}
else
{
is_target_channel = true;
}
if (is_target_channel)
{
result_size = WIFI_SCAN_RESULT_SIZE - priv->scan_result_size;
/* Copy BSSID */
if (result_size < ESP_IW_EVENT_SIZE(ap_addr))
{
goto scan_result_full;
}
iwe = (struct iw_event *)
&priv->scan_result[priv->scan_result_size];
iwe->len = ESP_IW_EVENT_SIZE(ap_addr);
iwe->cmd = SIOCGIWAP;
memcpy(&iwe->u.ap_addr.sa_data,
ap_list_buffer[bss_count].bssid,
sizeof(ap_list_buffer[bss_count].bssid));
iwe->u.ap_addr.sa_family = ARPHRD_ETHER;
priv->scan_result_size += ESP_IW_EVENT_SIZE(ap_addr);
result_size -= ESP_IW_EVENT_SIZE(ap_addr);
/* Copy ESSID */
essid_len = MIN(strlen((const char *)
ap_list_buffer[bss_count].ssid), SSID_MAX_LEN);
essid_len_aligned = (essid_len + 3) & -4;
if (result_size < ESP_IW_EVENT_SIZE(essid) + essid_len_aligned)
{
goto scan_result_full;
}
iwe = (struct iw_event *)
&priv->scan_result[priv->scan_result_size];
iwe->len = ESP_IW_EVENT_SIZE(essid) + essid_len_aligned;
iwe->cmd = SIOCGIWESSID;
iwe->u.essid.flags = 0;
iwe->u.essid.length = essid_len;
/* Special processing for iw_point, set offset
* in pointer field.
*/
iwe->u.essid.pointer = (void *)sizeof(iwe->u.essid);
memcpy(&iwe->u.essid + 1,
ap_list_buffer[bss_count].ssid, essid_len);
wlinfo("INFO: ssid %s\n", ap_list_buffer[bss_count].ssid);
priv->scan_result_size +=
ESP_IW_EVENT_SIZE(essid) + essid_len_aligned;
result_size -= ESP_IW_EVENT_SIZE(essid) + essid_len_aligned;
/* Copy link quality info */
if (result_size < ESP_IW_EVENT_SIZE(qual))
{
goto scan_result_full;
}
iwe = (struct iw_event *)
&priv->scan_result[priv->scan_result_size];
iwe->len = ESP_IW_EVENT_SIZE(qual);
iwe->cmd = IWEVQUAL;
iwe->u.qual.qual = 0x00;
wlinfo("INFO: signal %d\n", ap_list_buffer[bss_count].rssi);
iwe->u.qual.level = ap_list_buffer[bss_count].rssi;
iwe->u.qual.noise = 0x00;
iwe->u.qual.updated = IW_QUAL_DBM | IW_QUAL_ALL_UPDATED;
priv->scan_result_size += ESP_IW_EVENT_SIZE(qual);
result_size -= ESP_IW_EVENT_SIZE(qual);
/* Copy AP mode */
if (result_size < ESP_IW_EVENT_SIZE(mode))
{
goto scan_result_full;
}
iwe = (struct iw_event *)
&priv->scan_result[priv->scan_result_size];
iwe->len = ESP_IW_EVENT_SIZE(mode);
iwe->cmd = SIOCGIWMODE;
iwe->u.mode = IW_MODE_MASTER;
priv->scan_result_size += ESP_IW_EVENT_SIZE(mode);
result_size -= ESP_IW_EVENT_SIZE(mode);
/* Copy AP encryption mode */
if (result_size < ESP_IW_EVENT_SIZE(data))
{
goto scan_result_full;
}
iwe = (struct iw_event *)
&priv->scan_result[priv->scan_result_size];
iwe->len = ESP_IW_EVENT_SIZE(data);
iwe->cmd = SIOCGIWENCODE;
iwe->u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY;
iwe->u.data.length = 0;
iwe->u.essid.pointer = NULL;
priv->scan_result_size += ESP_IW_EVENT_SIZE(data);
result_size -= ESP_IW_EVENT_SIZE(data);
/* Copy AP channel */
if (result_size < ESP_IW_EVENT_SIZE(freq))
{
goto scan_result_full;
}
iwe = (struct iw_event *)
&priv->scan_result[priv->scan_result_size];
iwe->len = ESP_IW_EVENT_SIZE(freq);
iwe->cmd = SIOCGIWFREQ;
iwe->u.freq.e = 0;
iwe->u.freq.m = ap_list_buffer[bss_count].primary;
priv->scan_result_size += ESP_IW_EVENT_SIZE(freq);
result_size -= ESP_IW_EVENT_SIZE(freq);
}
}
parse_done = true;
}
scan_result_full:
/* Continue instead of break to log dropped AP results */
if (!parse_done)
{
wlerr("ERROR: No more space in scan_result buffer\n");
}
if (ap_list_buffer)
{
kmm_free(ap_list_buffer);
ap_list_buffer = NULL;
}
priv->scan_status = ESP_SCAN_DONE;
nxsem_post(&priv->scan_signal);
}

View file

@ -1,104 +0,0 @@
/****************************************************************************
* arch/xtensa/src/esp32s3/esp32s3_wifi_utils.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#ifndef __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_WIFI_UTILS_H
#define __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_WIFI_UTILS_H
#include <nuttx/config.h>
#include <nuttx/net/netdev.h>
#ifndef __ASSEMBLY__
#include <stdint.h>
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/****************************************************************************
* Name: esp_wifi_start_scan
*
* Description:
* Scan all available APs.
*
* Input Parameters:
* iwr - The argument of the ioctl cmd
*
* Returned Value:
* OK on success (positive non-zero values are cmd-specific)
* Negated errno returned on failure.
*
****************************************************************************/
int esp_wifi_start_scan(struct iwreq *iwr);
/****************************************************************************
* Name: esp_wifi_get_scan_results
*
* Description:
* Get scan result
*
* Input Parameters:
* req The argument of the ioctl cmd
*
* Returned Value:
* OK on success (positive non-zero values are cmd-specific)
* Negated errno returned on failure.
*
****************************************************************************/
int esp_wifi_get_scan_results(struct iwreq *iwr);
/****************************************************************************
* Name: esp_wifi_scan_event_parse
*
* Description:
* Parse scan information
*
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
void esp_wifi_scan_event_parse(void);
#ifdef __cplusplus
}
#endif
#undef EXTERN
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_WIFI_UTILS_H */

File diff suppressed because it is too large Load diff

View file

@ -1,370 +0,0 @@
/****************************************************************************
* arch/xtensa/src/esp32s3/esp32s3_wireless.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_WIRELESS_H
#define __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_WIRELESS_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <semaphore.h>
#include <stdbool.h>
#include <stdint.h>
#include <nuttx/config.h>
#include <nuttx/list.h>
#include "esp_attr.h"
#include "esp32s3_rt_timer.h"
#include "esp_log.h"
#include "esp_mac.h"
#include "esp_private/phy.h"
#include "esp_private/wifi.h"
#include "esp_random.h"
#include "esp_timer.h"
#include "rom/ets_sys.h"
#include "soc/soc_caps.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Note: Don't remove these definitions, they are needed by the 3rdparty IDF
* headers
*/
#define CONFIG_MAC_BB_PD (0)
#define MAC_LEN (6)
/****************************************************************************
* Public Types
****************************************************************************/
/* Semaphore Cache Data */
struct esp_semcache_s
{
struct list_node node;
sem_t *sem;
uint32_t count;
};
/* Queue Cache Data */
struct esp_queuecache_s
{
struct list_node node;
struct file *mq_ptr;
size_t size;
uint8_t *buffer;
};
/****************************************************************************
* Inline Functions
****************************************************************************/
/****************************************************************************
* Name: nuttx_err_to_freertos
*
* Description:
* Transform from Nuttx OS error code to FreeRTOS's pdTRUE or pdFALSE.
*
* Input Parameters:
* ret - NuttX error code
*
* Returned Value:
* Wi-Fi adapter error code
*
****************************************************************************/
static inline int32_t nuttx_err_to_freertos(int ret)
{
return ret >= 0;
}
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/****************************************************************************
* Name: esp_wifi_to_errno
*
* Description:
* Transform from ESP Wi-Fi error code to NuttX error code
*
* Input Parameters:
* err - ESP Wi-Fi error code
*
* Returned Value:
* NuttX error code defined in errno.h
*
****************************************************************************/
int32_t esp_wifi_to_errno(int err);
/****************************************************************************
* Functions needed by libphy.a
****************************************************************************/
/****************************************************************************
* Name: esp_dport_access_reg_read
*
* Description:
* Read register value safely in SMP
*
* Input Parameters:
* reg - Register address
*
* Returned Value:
* Register value
*
****************************************************************************/
uint32_t IRAM_ATTR esp_dport_access_reg_read(uint32_t reg);
/****************************************************************************
* Name: phy_printf
*
* Description:
* Output format string and its arguments
*
* Input Parameters:
* format - format string
*
* Returned Value:
* 0
*
****************************************************************************/
int phy_printf(const char *format, ...) printf_like(1, 2);
/****************************************************************************
* Name: esp_timer_create
*
* Description:
* Create timer with given arguments
*
* Input Parameters:
* create_args - Timer arguments data pointer
* out_handle - Timer handle pointer
*
* Returned Value:
* 0 if success or -1 if fail
*
****************************************************************************/
int32_t esp_timer_create(const esp_timer_create_args_t *create_args,
esp_timer_handle_t *out_handle);
/****************************************************************************
* Name: esp_timer_start_once
*
* Description:
* Start timer with one shot mode
*
* Input Parameters:
* timer - Timer handle pointer
* timeout_us - Timeout value by micro second
*
* Returned Value:
* 0 if success or -1 if fail
*
****************************************************************************/
int32_t esp_timer_start_once(esp_timer_handle_t timer, uint64_t timeout_us);
/****************************************************************************
* Name: esp_timer_start_periodic
*
* Description:
* Start timer with periodic mode
*
* Input Parameters:
* timer - Timer handle pointer
* period - Timeout value by micro second
*
* Returned Value:
* 0 if success or -1 if fail
*
****************************************************************************/
int32_t esp_timer_start_periodic(esp_timer_handle_t timer, uint64_t period);
/****************************************************************************
* Name: esp_timer_stop
*
* Description:
* Stop timer
*
* Input Parameters:
* timer - Timer handle pointer
*
* Returned Value:
* 0 if success or -1 if fail
*
****************************************************************************/
int32_t esp_timer_stop(esp_timer_handle_t timer);
/****************************************************************************
* Name: esp_timer_delete
*
* Description:
* Delete timer and free resource
*
* Input Parameters:
* timer - Timer handle pointer
*
* Returned Value:
* 0 if success or -1 if fail
*
****************************************************************************/
int32_t esp_timer_delete(esp_timer_handle_t timer);
/****************************************************************************
* Name: esp32s3_phy_update_country_info
*
* Description:
* Update PHY init data according to country code
*
* Input Parameters:
* country - PHY init data type
*
* Returned Value:
* OK on success; a negated errno on failure
*
****************************************************************************/
int esp32s3_phy_update_country_info(const char *country);
/****************************************************************************
* Name: esp_init_semcache
*
* Description:
* Initialize semaphore cache.
*
* Parameters:
* sc - Semaphore cache data pointer
* sem - Semaphore data pointer
*
* Returned Value:
* None.
*
****************************************************************************/
void esp_init_semcache(struct esp_semcache_s *sc, sem_t *sem);
/****************************************************************************
* Name: esp_post_semcache
*
* Description:
* Store posting semaphore action into semaphore cache.
*
* Parameters:
* sc - Semaphore cache data pointer
*
* Returned Value:
* None.
*
****************************************************************************/
void esp_post_semcache(struct esp_semcache_s *sc);
/****************************************************************************
* Name: esp_init_queuecache
*
* Description:
* Initialize queue cache.
*
* Parameters:
* qc - Queue cache data pointer
* mq_ptr - Queue data pointer
* buffer - Queue cache buffer pointer
* size - Queue cache buffer size
*
* Returned Value:
* None.
*
****************************************************************************/
void esp_init_queuecache(struct esp_queuecache_s *qc,
struct file *mq_ptr,
uint8_t *buffer,
size_t size);
/****************************************************************************
* Name: esp32_wl_send_queuecache
*
* Description:
* Store posting queue action and data into queue cache.
*
* Parameters:
* qc - Queue cache data pointer
* buffer - Data buffer
* size - Buffer size
*
* Returned Value:
* None.
*
****************************************************************************/
void esp_send_queuecache(struct esp_queuecache_s *qc,
uint8_t *buffer,
int size);
/****************************************************************************
* Name: esp_wireless_init
*
* Description:
* Initialize ESP32 wireless common components for both BT and Wi-Fi.
*
* Parameters:
* None
*
* Returned Value:
* Zero (OK) is returned on success. A negated errno value is returned on
* failure.
*
****************************************************************************/
int esp_wireless_init(void);
/****************************************************************************
* Name: esp_wireless_deinit
*
* Description:
* De-initialize ESP32 wireless common components.
*
* Parameters:
* None
*
* Returned Value:
* Zero (OK) is returned on success. A negated errno value is returned on
* failure.
*
****************************************************************************/
int esp_wireless_deinit(void);
#endif /* __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_WIRELESS_H */

File diff suppressed because it is too large Load diff

View file

@ -1,111 +0,0 @@
/****************************************************************************
* arch/xtensa/src/esp32s3/esp32s3_wlan.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_WLAN_H
#define __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_WLAN_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include "esp32s3_wifi_adapter.h"
#ifndef __ASSEMBLY__
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
#ifdef CONFIG_ESP32S3_WIFI
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
#ifdef ESP32S3_WLAN_HAS_STA
/****************************************************************************
* Name: esp32s3_wlan_sta_set_linkstatus
*
* Description:
* Set Wi-Fi station link status
*
* Parameters:
* linkstatus - true Notifies the networking layer about an available
* carrier, false Notifies the networking layer about an
* disappeared carrier.
*
* Returned Value:
* OK on success; Negated errno on failure.
*
****************************************************************************/
int esp32s3_wlan_sta_set_linkstatus(bool linkstatus);
/****************************************************************************
* Name: esp32s3_wlan_sta_initialize
*
* Description:
* Initialize the ESP32-S3 WLAN station netcard driver
*
* Input Parameters:
* None
*
* Returned Value:
* OK on success; Negated errno on failure.
*
****************************************************************************/
int esp32s3_wlan_sta_initialize(void);
#endif /* ESP32S3_WLAN_HAS_STA */
/****************************************************************************
* Name: esp32s3_wlan_softap_initialize
*
* Description:
* Initialize the ESP32-S3 WLAN softAP netcard driver
*
* Input Parameters:
* None
*
* Returned Value:
* OK on success; Negated errno on failure.
*
****************************************************************************/
#ifdef ESP32S3_WLAN_HAS_SOFTAP
int esp32s3_wlan_softap_initialize(void);
#endif /* ESP32S3_WLAN_HAS_SOFTAP */
#endif /* CONFIG_ESP32S3_WIFI */
#ifdef __cplusplus
}
#endif
#undef EXTERN
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_WLAN_H */

View file

@ -28,6 +28,7 @@ INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)private_include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_common$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_coex$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_event$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)include
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)include$(DELIM)esp_private

View file

@ -48,7 +48,7 @@ extern "C"
* Public Function Prototypes
****************************************************************************/
#ifdef CONFIG_ESP32S3_WIFI
#ifdef CONFIG_ESPRESSIF_WIFI
/****************************************************************************
* Name: board_wlan_init
@ -64,7 +64,7 @@ extern "C"
int board_wlan_init(void);
#endif /* CONFIG_ESP32S3_WIFI */
#endif /* CONFIG_ESPRESSIF_WIFI */
#undef EXTERN
#if defined(__cplusplus)

View file

@ -24,10 +24,10 @@
/* Bluetooth needs symbol alias, to be removed after IDF rename it */
#ifdef CONFIG_ESP32S3_BLE
#ifdef CONFIG_ESPRESSIF_BLE
api_vhci_host_check_send_available = API_vhci_host_check_send_available;
api_vhci_host_send_packet = API_vhci_host_send_packet;
api_vhci_host_register_callback = API_vhci_host_register_callback;
#endif
PROVIDE( cache_writeback_addr = Cache_WriteBack_Addr );
PROVIDE( cache_writeback_addr = Cache_WriteBack_Addr );

View file

@ -474,7 +474,7 @@ SECTIONS
*libarch.a:*cache_hal.* *libarch.a:*mmu_hal.*
*libarch.a:*mpu_hal.*) .rodata.*)
#ifdef CONFIG_ESP32S3_WIRELESS
#ifdef CONFIG_ESPRESSIF_WIRELESS
*(.rodata_wlog_verbose.*)
*(.rodata_wlog_debug.*)
*(.rodata_wlog_info.*)

View file

@ -303,7 +303,7 @@ SECTIONS
*(.rodata)
*(.rodata.*)
#ifdef CONFIG_ESP32S3_WIRELESS
#ifdef CONFIG_ESPRESSIF_WIRELESS
*(.rodata_wlog_verbose.*)
*(.rodata_wlog_debug.*)
*(.rodata_wlog_info.*)

View file

@ -79,7 +79,7 @@ SECTIONS
*libarch.a:*cache_hal.* *libarch.a:*mmu_hal.*
*libarch.a:*mpu_hal.*) .rodata.*)
#ifdef CONFIG_ESP32S3_WIRELESS
#ifdef CONFIG_ESPRESSIF_WIRELESS
*(.rodata_wlog_verbose.*)
*(.rodata_wlog_debug.*)
*(.rodata_wlog_info.*)

View file

@ -38,7 +38,7 @@ ifeq ($(CONFIG_SPI_DRIVER),y)
CSRCS += esp32s3_board_spidev.c
endif
ifeq ($(CONFIG_ESP32S3_WIFI),y)
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)
CSRCS += esp32s3_board_wlan.c
endif

View file

@ -36,7 +36,7 @@
#include <nuttx/wireless/wireless.h>
#include "esp32s3_spiflash.h"
#include "esp32s3_wlan.h"
#include "espressif/esp_wlan.h"
/****************************************************************************
* Public Functions
@ -61,24 +61,23 @@ int board_wlan_init(void)
{
int ret = OK;
#ifdef ESP32S3_WLAN_HAS_STA
ret = esp32s3_wlan_sta_initialize();
#ifdef ESPRESSIF_WLAN_HAS_STA
ret = esp_wlan_sta_initialize();
if (ret)
{
wlerr("ERROR: Failed to initialize Wi-Fi station\n");
return ret;
}
#endif /* ESP32S3_WLAN_HAS_STA */
#endif /* ESPRESSIF_WLAN_HAS_STA */
#ifdef ESP32S3_WLAN_HAS_SOFTAP
ret = esp32s3_wlan_softap_initialize();
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
ret = esp_wlan_softap_initialize();
if (ret)
{
wlerr("ERROR: Failed to initialize Wi-Fi softAP\n");
return ret;
}
#endif /* ESP32S3_WLAN_HAS_SOFTAP */
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
return ret;
}

View file

@ -42,15 +42,15 @@
# include "esp32s3_board_tim.h"
#endif
#ifdef CONFIG_ESP32S3_WIFI
#ifdef CONFIG_ESPRESSIF_WIFI
# include "esp32s3_board_wlan.h"
#endif
#ifdef CONFIG_ESP32S3_BLE
#ifdef CONFIG_ESPRESSIF_BLE
# include "esp32s3_ble.h"
#endif
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
# include "esp32s3_wifi_adapter.h"
#endif
@ -193,9 +193,9 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32S3_WIRELESS
#ifdef CONFIG_ESPRESSIF_WIRELESS
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
ret = esp32s3_wifi_bt_coexist_init();
if (ret)
{
@ -203,7 +203,7 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32S3_BLE
#ifdef CONFIG_ESPRESSIF_BLE
ret = esp32s3_ble_initialize();
if (ret)
{
@ -211,7 +211,7 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32S3_WIFI
#ifdef CONFIG_ESPRESSIF_WIFI
ret = board_wlan_init();
if (ret < 0)
{

View file

@ -47,7 +47,7 @@ CONFIG_ESP32S3_I2S=y
CONFIG_ESP32S3_SPIFLASH=y
CONFIG_ESP32S3_SPIFLASH_SPIFFS=y
CONFIG_ESP32S3_UART0=y
CONFIG_ESP32S3_WIFI=y
CONFIG_ESPRESSIF_WIFI=y
CONFIG_EXAMPLES_RANDOM=y
CONFIG_FS_PROCFS=y
CONFIG_I2S_DMADESC_NUM=4

View file

@ -28,9 +28,9 @@ CONFIG_DEFAULT_TASK_STACKSIZE=4096
CONFIG_DRIVERS_BLUETOOTH=y
CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32S3_BLE=y
CONFIG_ESP32S3_RT_TIMER_TASK_STACK_SIZE=4096
CONFIG_ESP32S3_UART0=y
CONFIG_ESPRESSIF_BLE=y
CONFIG_FS_LARGEFILE=y
CONFIG_FS_PROCFS=y
CONFIG_IDLETHREAD_STACKSIZE=3072

View file

@ -31,11 +31,11 @@ CONFIG_DEFAULT_TASK_STACKSIZE=4096
CONFIG_DRIVERS_BLUETOOTH=y
CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32S3_BLE=y
CONFIG_ESP32S3_RT_TIMER_TASK_STACK_SIZE=4096
CONFIG_ESP32S3_UART0=y
CONFIG_ESP32S3_WIFI=y
CONFIG_ESP32S3_WIFI_STATION_SOFTAP=y
CONFIG_ESPRESSIF_BLE=y
CONFIG_ESPRESSIF_WIFI=y
CONFIG_ESPRESSIF_WIFI_STATION_SOFTAP=y
CONFIG_EXAMPLES_DHCPD=y
CONFIG_EXAMPLES_RANDOM=y
CONFIG_FS_LARGEFILE=y

View file

@ -33,8 +33,8 @@ CONFIG_ESP32S3_SPIFLASH_SPIFFS=y
CONFIG_ESP32S3_STORAGE_MTD_OFFSET=0x200000
CONFIG_ESP32S3_UART0=y
CONFIG_ESP32S3_WCL=y
CONFIG_ESP32S3_WIFI=y
CONFIG_ESP32S3_WIFI_STATION_SOFTAP=y
CONFIG_ESPRESSIF_WIFI=y
CONFIG_ESPRESSIF_WIFI_STATION_SOFTAP=y
CONFIG_EXAMPLES_DHCPD=y
CONFIG_EXAMPLES_RANDOM=y
CONFIG_FS_PROCFS=y

View file

@ -31,8 +31,8 @@ CONFIG_ESP32S3_RT_TIMER_TASK_STACK_SIZE=4096
CONFIG_ESP32S3_SPIFLASH=y
CONFIG_ESP32S3_SPIFLASH_SPIFFS=y
CONFIG_ESP32S3_UART0=y
CONFIG_ESP32S3_WIFI=y
CONFIG_ESP32S3_WIFI_STATION_SOFTAP=y
CONFIG_ESPRESSIF_WIFI=y
CONFIG_ESPRESSIF_WIFI_STATION_SOFTAP=y
CONFIG_ESP_WPA_DEBUG_PRINT=y
CONFIG_EXAMPLES_DHCPD=y
CONFIG_EXAMPLES_RANDOM=y

View file

@ -31,7 +31,7 @@ CONFIG_ESP32S3_SPIRAM_MODE_OCT=y
CONFIG_ESP32S3_SPI_FLASH_SUPPORT_PSRAM_STACK=y
CONFIG_ESP32S3_STORAGE_MTD_SIZE=0x1e80000
CONFIG_ESP32S3_UART0=y
CONFIG_ESP32S3_WIFI=y
CONFIG_ESPRESSIF_WIFI=y
CONFIG_EXAMPLES_RANDOM=y
CONFIG_FS_LARGEFILE=y
CONFIG_FS_LITTLEFS=y

View file

@ -29,7 +29,7 @@ CONFIG_ESP32S3_RT_TIMER_TASK_STACK_SIZE=4096
CONFIG_ESP32S3_SPIFLASH=y
CONFIG_ESP32S3_SPIFLASH_SPIFFS=y
CONFIG_ESP32S3_UART0=y
CONFIG_ESP32S3_WIFI=y
CONFIG_ESPRESSIF_WIFI=y
CONFIG_EXAMPLES_RANDOM=y
CONFIG_FS_PROCFS=y
CONFIG_IDLETHREAD_STACKSIZE=3072

View file

@ -44,15 +44,15 @@
# include "esp32s3_board_tim.h"
#endif
#ifdef CONFIG_ESP32S3_WIFI
#ifdef CONFIG_ESPRESSIF_WIFI
# include "esp32s3_board_wlan.h"
#endif
#ifdef CONFIG_ESP32S3_BLE
#ifdef CONFIG_ESPRESSIF_BLE
# include "esp32s3_ble.h"
#endif
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
# include "esp32s3_wifi_adapter.h"
#endif
@ -429,17 +429,17 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32S3_WIRELESS
#ifdef CONFIG_ESPRESSIF_WIRELESS
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
ret = esp32s3_wifi_bt_coexist_init();
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
ret = esp_wifi_bt_coexist_init();
if (ret)
{
syslog(LOG_ERR, "ERROR: Failed to initialize Wi-Fi and BT coexist\n");
}
#endif
#ifdef CONFIG_ESP32S3_BLE
#ifdef CONFIG_ESPRESSIF_BLE
ret = esp32s3_ble_initialize();
if (ret)
{
@ -447,7 +447,7 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32S3_WIFI
#ifdef CONFIG_ESPRESSIF_WIFI
ret = board_wlan_init();
if (ret < 0)
{

View file

@ -29,7 +29,7 @@ CONFIG_ESP32S3_RT_TIMER_TASK_STACK_SIZE=4096
CONFIG_ESP32S3_SPIRAM=y
CONFIG_ESP32S3_SPIRAM_MODE_OCT=y
CONFIG_ESP32S3_USBSERIAL=y
CONFIG_ESP32S3_WIFI=y
CONFIG_ESPRESSIF_WIFI=y
CONFIG_EXAMPLES_RANDOM=y
CONFIG_FS_PROCFS=y
CONFIG_IDLETHREAD_STACKSIZE=3072

View file

@ -42,15 +42,15 @@
# include "esp32s3_board_tim.h"
#endif
#ifdef CONFIG_ESP32S3_WIFI
#ifdef CONFIG_ESPRESSIF_WIFI
# include "esp32s3_board_wlan.h"
#endif
#ifdef CONFIG_ESP32S3_BLE
#ifdef CONFIG_ESPRESSIF_BLE
# include "esp32s3_ble.h"
#endif
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
# include "esp32s3_wifi_adapter.h"
#endif
@ -184,9 +184,9 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32S3_WIRELESS
#ifdef CONFIG_ESPRESSIF_WIRELESS
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
ret = esp32s3_wifi_bt_coexist_init();
if (ret)
{
@ -194,7 +194,7 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32S3_BLE
#ifdef CONFIG_ESPRESSIF_BLE
ret = esp32s3_ble_initialize();
if (ret)
{
@ -202,7 +202,7 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32S3_WIFI
#ifdef CONFIG_ESPRESSIF_WIFI
ret = board_wlan_init();
if (ret < 0)
{

View file

@ -52,7 +52,7 @@ CONFIG_ESP32S3_SPIFLASH_SPIFFS=y
CONFIG_ESP32S3_SPIRAM=y
CONFIG_ESP32S3_SPIRAM_MODE_OCT=y
CONFIG_ESP32S3_UART0=y
CONFIG_ESP32S3_WIFI=y
CONFIG_ESPRESSIF_WIFI=y
CONFIG_FS_PROCFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y

View file

@ -53,7 +53,7 @@ CONFIG_ESP32S3_SPIFLASH_SPIFFS=y
CONFIG_ESP32S3_SPIRAM=y
CONFIG_ESP32S3_SPIRAM_MODE_OCT=y
CONFIG_ESP32S3_UART0=y
CONFIG_ESP32S3_WIFI=y
CONFIG_ESPRESSIF_WIFI=y
CONFIG_FS_PROCFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y

View file

@ -45,15 +45,15 @@
# include "esp32s3_board_tim.h"
#endif
#ifdef CONFIG_ESP32S3_WIFI
#ifdef CONFIG_ESPRESSIF_WIFI
# include "esp32s3_board_wlan.h"
#endif
#ifdef CONFIG_ESP32S3_BLE
#ifdef CONFIG_ESPRESSIF_BLE
# include "esp32s3_ble.h"
#endif
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
# include "esp32s3_wifi_adapter.h"
#endif
@ -377,9 +377,9 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32S3_WIRELESS
#ifdef CONFIG_ESPRESSIF_WIRELESS
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
ret = esp32s3_wifi_bt_coexist_init();
if (ret)
{
@ -387,7 +387,7 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32S3_BLE
#ifdef CONFIG_ESPRESSIF_BLE
ret = esp32s3_ble_initialize();
if (ret)
{
@ -395,7 +395,7 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32S3_WIFI
#ifdef CONFIG_ESPRESSIF_WIFI
ret = board_wlan_init();
if (ret < 0)
{

View file

@ -50,7 +50,7 @@ CONFIG_ESP32S3_I2S=y
CONFIG_ESP32S3_SPIFLASH=y
CONFIG_ESP32S3_SPIFLASH_SPIFFS=y
CONFIG_ESP32S3_UART0=y
CONFIG_ESP32S3_WIFI=y
CONFIG_ESPRESSIF_WIFI=y
CONFIG_EXAMPLES_RANDOM=y
CONFIG_FS_PROCFS=y
CONFIG_HAVE_CXX=y

View file

@ -45,15 +45,15 @@
# include "esp32s3_board_tim.h"
#endif
#ifdef CONFIG_ESP32S3_WIFI
#ifdef CONFIG_ESPRESSIF_WIFI
# include "esp32s3_board_wlan.h"
#endif
#ifdef CONFIG_ESP32S3_BLE
#ifdef CONFIG_ESPRESSIF_BLE
# include "esp32s3_ble.h"
#endif
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
# include "esp32s3_wifi_adapter.h"
#endif
@ -269,9 +269,9 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32S3_WIRELESS
#ifdef CONFIG_ESPRESSIF_WIRELESS
#ifdef CONFIG_ESP32S3_WIFI_BT_COEXIST
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
ret = esp32s3_wifi_bt_coexist_init();
if (ret)
{
@ -279,7 +279,7 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32S3_BLE
#ifdef CONFIG_ESPRESSIF_BLE
ret = esp32s3_ble_initialize();
if (ret)
{
@ -287,7 +287,7 @@ int esp32s3_bringup(void)
}
#endif
#ifdef CONFIG_ESP32S3_WIFI
#ifdef CONFIG_ESPRESSIF_WIFI
ret = board_wlan_init();
if (ret < 0)
{