xtensa/esp32: use common Espressif wireless source
Update the wireless symbols from ESP32_* to ESPRESSIF_* for using common layer. Remove ESP32 specific WiFi files and edit build system to use common layer. Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
This commit is contained in:
parent
96de2e20c1
commit
b89ad74660
69 changed files with 369 additions and 5181 deletions
|
|
@ -516,7 +516,9 @@ config ESPRESSIF_WIRELESS
|
|||
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
|
||||
select ESP32_RNG if ARCH_CHIP_ESP32
|
||||
select ESP32_RT_TIMER if ARCH_CHIP_ESP32
|
||||
select ESP32_TIMER0 if ARCH_CHIP_ESP32
|
||||
---help---
|
||||
Enable Wireless support
|
||||
|
||||
|
|
@ -529,9 +531,11 @@ config ESPRESSIF_WIFI
|
|||
|
||||
config ESPRESSIF_BLE
|
||||
bool "BLE"
|
||||
depends on ARCH_CHIP_ESP32S3
|
||||
depends on ARCH_CHIP_ESP32S3 || ARCH_CHIP_ESP32
|
||||
default n
|
||||
select ESPRESSIF_WIRELESS
|
||||
select BLUETOOTH_TXCMD_PINNED_TO_CORE if SMP && ARCH_CHIP_ESP32
|
||||
select BLUETOOTH_CNTRL_HOST_FLOW_DISABLE if ARCH_CHIP_ESP32
|
||||
---help---
|
||||
Enable BLE support.
|
||||
|
||||
|
|
@ -720,6 +724,13 @@ config ESPRESSIF_WIFI_LISTEN_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.
|
||||
|
||||
config ESPRESSIF_WIFI_WLAN_BUFFER_OPTIMIZATION
|
||||
bool "Enable optimization of WLAN driver buffer"
|
||||
default n
|
||||
depends on ARCH_CHIP_ESP32
|
||||
---help---
|
||||
Enable optimization of WLAN memory
|
||||
|
||||
endmenu # ESPRESSIF_WIFI
|
||||
|
||||
menu "BLE Configuration"
|
||||
|
|
|
|||
|
|
@ -20,28 +20,40 @@
|
|||
#
|
||||
############################################################################
|
||||
|
||||
ifeq ($(CONFIG_ARCH_CHIP_ESP32),y)
|
||||
INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bt$(DELIM)include$(DELIM)$(CHIP_SERIES)$(DELIM)include
|
||||
endif
|
||||
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)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
|
||||
|
||||
ifeq ($(CONFIG_ARCH_CHIP_ESP32),y)
|
||||
EXTRA_LIBPATHS += -L $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)bt$(DELIM)controller$(DELIM)lib_esp32$(DELIM)$(CHIP_SERIES)
|
||||
endif
|
||||
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_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)
|
||||
|
||||
ifeq ($(CONFIG_ARCH_CHIP_ESP32S3),y)
|
||||
ifeq ($(CONFIG_ARCH_CHIP_ESP32),y)
|
||||
EXTRA_LIBS += -lrtc
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_ARCH_CHIP_ESP32S2),y)
|
||||
EXTRA_LIBS += -lcoexist
|
||||
endif
|
||||
|
||||
EXTRA_LIBS += -lphy
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)
|
||||
EXTRA_LIBS += -lcore -lnet80211 -lpp
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_WPA_WAPI_PSK),y)
|
||||
EXTRA_LIBS += -lwapi
|
||||
|
|
@ -251,5 +263,3 @@ CHIP_CSRCS += crypto_mbedtls-rsa.c
|
|||
CHIP_CSRCS += crypto_mbedtls.c
|
||||
CHIP_CSRCS += tls_mbedtls.c
|
||||
CHIP_CSRCS += aes-siv.c
|
||||
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@
|
|||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/wireless/wireless.h>
|
||||
|
||||
#ifdef CONFIG_ARCH_CHIP_ESP32
|
||||
#include "esp32_wifi_adapter.h"
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_CHIP_ESP32S2
|
||||
#include "esp32s2_wifi_adapter.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ struct esp_wireless_priv_s
|
|||
static inline void phy_digital_regs_store(void);
|
||||
static inline void phy_digital_regs_load(void);
|
||||
static int esp_swi_irq(int irq, void *context, void *arg);
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
# if defined(CONFIG_ARCH_CHIP_ESP32) && defined(CONFIG_ESPRESSIF_WIFI)
|
||||
static void esp_wifi_set_log_level(void);
|
||||
#endif
|
||||
|
||||
|
|
@ -1516,8 +1516,7 @@ int32_t esp_wifi_init(const wifi_init_config_t *config)
|
|||
esp_wifi_set_sleep_wait_broadcast_data_time(wait_broadcast_data_time_us);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ESP32S3_WIFI_BT_COEXIST) || \
|
||||
defined(CONFIG_ESP32_WIFI_BT_COEXIST)
|
||||
#if defined(CONFIG_ESPRESSIF_WIFI_BT_COEXIST)
|
||||
ret = coex_init();
|
||||
if (ret)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -178,7 +178,11 @@ struct wlan_priv_s
|
|||
|
||||
/* Packet buffer cache */
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_WLAN_BUFFER_OPTIMIZATION
|
||||
struct wlan_pktbuf *pktbuf;
|
||||
#else
|
||||
struct wlan_pktbuf pktbuf[WLAN_PKTBUF_NUM];
|
||||
#endif
|
||||
|
||||
/* RX packet queue */
|
||||
|
||||
|
|
@ -292,6 +296,9 @@ static int wlan_ioctl(struct net_driver_s *dev, int cmd,
|
|||
unsigned long arg);
|
||||
#endif
|
||||
|
||||
static inline void wlan_free_buffer(struct wlan_priv_s *priv,
|
||||
uint8_t *buffer);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
|
@ -324,6 +331,17 @@ static inline void wlan_init_buffer(struct wlan_priv_s *priv)
|
|||
{
|
||||
irqstate_t flags;
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_WLAN_BUFFER_OPTIMIZATION
|
||||
flags = spin_lock_irqsave(&priv->lock);
|
||||
|
||||
priv->dev.d_buf = NULL;
|
||||
priv->dev.d_len = 0;
|
||||
|
||||
sq_init(&priv->rxb);
|
||||
sq_init(&priv->txb);
|
||||
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
#else
|
||||
int i;
|
||||
flags = spin_lock_irqsave(&priv->lock);
|
||||
|
||||
|
|
@ -340,6 +358,40 @@ static inline void wlan_init_buffer(struct wlan_priv_s *priv)
|
|||
}
|
||||
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Function: wlan_deinit_buffer
|
||||
*
|
||||
* Description:
|
||||
* De-initialize the buffer list
|
||||
*
|
||||
* Input Parameters:
|
||||
* priv - Reference to the driver state structure
|
||||
*
|
||||
* Returned Value:
|
||||
* None.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static inline void wlan_deinit_buffer(struct wlan_priv_s *priv)
|
||||
{
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_WLAN_BUFFER_OPTIMIZATION
|
||||
struct wlan_pktbuf *pktbuf;
|
||||
while ((pktbuf = (struct wlan_pktbuf *)wlan_recvframe(priv)) != NULL)
|
||||
{
|
||||
wlan_free_buffer(priv, (void *)pktbuf->buffer);
|
||||
}
|
||||
|
||||
while ((pktbuf = (struct wlan_pktbuf *)wlan_txframe(priv)) != NULL)
|
||||
{
|
||||
wlan_free_buffer(priv, (void *)pktbuf->buffer);
|
||||
}
|
||||
|
||||
sq_init(&priv->rxb);
|
||||
sq_init(&priv->txb);
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
@ -360,6 +412,15 @@ static inline struct wlan_pktbuf *wlan_alloc_buffer(struct wlan_priv_s *priv)
|
|||
{
|
||||
struct wlan_pktbuf *pktbuf = NULL;
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_WLAN_BUFFER_OPTIMIZATION
|
||||
struct mallinfo info = kmm_mallinfo();
|
||||
if (info.fordblks < MINIMUM_HEAP_SIZE)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pktbuf = kmm_malloc(sizeof(struct wlan_pktbuf) + WLAN_BUF_SIZE);
|
||||
#else
|
||||
sq_entry_t *entry;
|
||||
irqstate_t flags = spin_lock_irqsave(&priv->lock);
|
||||
|
||||
|
|
@ -371,6 +432,7 @@ static inline struct wlan_pktbuf *wlan_alloc_buffer(struct wlan_priv_s *priv)
|
|||
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
|
||||
#endif
|
||||
return pktbuf;
|
||||
}
|
||||
|
||||
|
|
@ -394,12 +456,17 @@ static inline void wlan_free_buffer(struct wlan_priv_s *priv,
|
|||
{
|
||||
struct wlan_pktbuf *pktbuf;
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_WLAN_BUFFER_OPTIMIZATION
|
||||
pktbuf = container_of(buffer, struct wlan_pktbuf, buffer);
|
||||
kmm_free(pktbuf);
|
||||
#else
|
||||
irqstate_t flags = spin_lock_irqsave(&priv->lock);
|
||||
|
||||
pktbuf = container_of(buffer, struct wlan_pktbuf, buffer);
|
||||
sq_addlast(&pktbuf->entry, &priv->freeb);
|
||||
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
@ -1098,6 +1165,9 @@ static int wlan_ifup(struct net_driver_s *dev)
|
|||
ret = priv->ops->start();
|
||||
if (ret < 0)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_CHIP_ESP32
|
||||
wlan_deinit_buffer(priv);
|
||||
#endif
|
||||
net_unlock();
|
||||
nerr("ERROR: Failed to start Wi-Fi ret=%d\n", ret);
|
||||
return ret;
|
||||
|
|
@ -1114,6 +1184,14 @@ static int wlan_ifup(struct net_driver_s *dev)
|
|||
}
|
||||
|
||||
++g_callback_register_ref;
|
||||
|
||||
#ifdef CONFIG_ARCH_CHIP_ESP32
|
||||
/* We can make sure that the WLAN TX and RX are not doing, because
|
||||
* the process is in "net_lock()"
|
||||
*/
|
||||
|
||||
wlan_deinit_buffer(priv);
|
||||
#endif
|
||||
net_unlock();
|
||||
|
||||
return OK;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@
|
|||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#ifdef CONFIG_ARCH_CHIP_ESP32
|
||||
# include "esp32_wifi_adapter.h"
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_CHIP_ESP32S2
|
||||
# include "esp32s2_wifi_adapter.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -725,17 +725,6 @@ config ESP32_UART2
|
|||
select UART2_SERIALDRIVER
|
||||
select ARCH_HAVE_SERIAL_TERMIOS
|
||||
|
||||
config ESP32_WIRELESS
|
||||
bool
|
||||
default n
|
||||
select NET
|
||||
select ARCH_PHY_INTERRUPT
|
||||
select ESP32_RNG
|
||||
select ESP32_RT_TIMER
|
||||
select ESP32_TIMER0
|
||||
---help---
|
||||
Enable Wireless support
|
||||
|
||||
config ESP32_ESPNOW_PKTRADIO
|
||||
bool "ESPNOW packet radio support"
|
||||
select ESP32_WIRELESS
|
||||
|
|
@ -838,22 +827,6 @@ endif #PKTRADIO_ADDRLEN > 1
|
|||
|
||||
endif #ESP32_ESPNOW_PKTRADIO
|
||||
|
||||
config ESP32_WIFI
|
||||
bool "Wi-Fi"
|
||||
default n
|
||||
select ESP32_WIRELESS
|
||||
---help---
|
||||
Enable Wi-Fi support
|
||||
|
||||
config ESP32_BLE
|
||||
bool "BLE"
|
||||
default n
|
||||
select ESP32_WIRELESS
|
||||
select BLUETOOTH_TXCMD_PINNED_TO_CORE if SMP
|
||||
select BLUETOOTH_CNTRL_HOST_FLOW_DISABLE
|
||||
---help---
|
||||
Enable BLE support
|
||||
|
||||
config ESP32_I2C0
|
||||
bool "I2C 0"
|
||||
default n
|
||||
|
|
@ -885,13 +858,6 @@ config ESP32_PID
|
|||
|
||||
endmenu # ESP32 Peripheral Selection
|
||||
|
||||
config ESP32_WIFI_BT_COEXIST
|
||||
bool "Wi-Fi and BT coexist"
|
||||
default y if ESP32_WIFI && ESP32_BLE
|
||||
default n
|
||||
depends on ESP32_WIFI && ESP32_BLE
|
||||
select ESP32_WIFI_STA_DISCONNECT_PM
|
||||
|
||||
menu "Interrupt Configuration"
|
||||
|
||||
config ESP32_IRAM_ISR_DEBUG
|
||||
|
|
@ -909,8 +875,8 @@ menu "Memory Configuration"
|
|||
|
||||
config ESP32_BT_RESERVE_DRAM
|
||||
int "Reserved BT DRAM"
|
||||
default 0 if !ESP32_BLE
|
||||
default 65536 if ESP32_BLE
|
||||
default 0 if !ESPRESSIF_BLE
|
||||
default 65536 if ESPRESSIF_BLE
|
||||
|
||||
config ESP32_TRACEMEM_RESERVE_DRAM
|
||||
int "Reserved trace memory DRAM"
|
||||
|
|
@ -2167,142 +2133,10 @@ config ESP32_ETH_PHY_ADDR
|
|||
|
||||
endmenu # ESP32_EMAC
|
||||
|
||||
menu "Wi-Fi Configuration"
|
||||
depends on ESP32_WIFI
|
||||
|
||||
choice
|
||||
prompt "ESP32 Wi-Fi mode"
|
||||
default ESP32_WIFI_STATION
|
||||
|
||||
config ESP32_WIFI_STATION
|
||||
bool "Station mode"
|
||||
|
||||
config ESP32_WIFI_SOFTAP
|
||||
bool "SoftAP mode"
|
||||
|
||||
config ESP32_WIFI_STATION_SOFTAP
|
||||
bool "Station + SoftAP"
|
||||
|
||||
endchoice # ESP32 Wi-Fi mode
|
||||
|
||||
config ESP32_WIFI_STATIC_RXBUF_NUM
|
||||
int "Wi-Fi static RX buffer number"
|
||||
default 10
|
||||
|
||||
config ESP32_WIFI_DYNAMIC_RXBUF_NUM
|
||||
int "Wi-Fi dynamic RX buffer number"
|
||||
default 32
|
||||
|
||||
config ESP32_WIFI_DYNAMIC_TXBUF_NUM
|
||||
int "Wi-Fi dynamic TX buffer number"
|
||||
default 32
|
||||
|
||||
config ESP32_WIFI_TX_AMPDU
|
||||
bool "Wi-Fi TX AMPDU"
|
||||
default y
|
||||
|
||||
config ESP32_WIFI_RX_AMPDU
|
||||
bool "Wi-Fi RX AMPDU"
|
||||
default y
|
||||
|
||||
config ESP32_WIFI_RXBA_AMPDU_WZ
|
||||
int "Wi-Fi RX BA AMPDU windown size"
|
||||
default 6
|
||||
|
||||
config ESP32_WLAN_PKTBUF_NUM
|
||||
int "WLAN netcard packet buffer number per netcard"
|
||||
default 16
|
||||
|
||||
config ESP32_WIFI_CONNECT_TIMEOUT
|
||||
int "Connect timeout by second"
|
||||
default 10
|
||||
---help---
|
||||
Max waiting time of connecting to AP.
|
||||
|
||||
config ESP32_WIFI_SCAN_RESULT_SIZE
|
||||
int "Scan result buffer"
|
||||
default 4096
|
||||
---help---
|
||||
Maximum scan result buffer size.
|
||||
|
||||
config ESP32_WIFI_STA_DISCONNECT_PM
|
||||
bool "Power Management for station when disconnected"
|
||||
default n
|
||||
---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.
|
||||
|
||||
config EXAMPLE_WIFI_LISTEN_INTERVAL
|
||||
int "Wi-Fi listen interval"
|
||||
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.
|
||||
|
||||
choice EXAMPLE_POWER_SAVE_MODE
|
||||
prompt "Power save mode"
|
||||
default EXAMPLE_POWER_SAVE_NONE
|
||||
---help---
|
||||
Power save mode for the esp32 to use. Modem sleep mode includes minimum and maximum power save modes.
|
||||
In minimum power save mode, station wakes up every DTIM to receive beacon. Broadcast data will not be
|
||||
lost because it is transmitted after DTIM. However, it can not save much more power if DTIM is short
|
||||
for DTIM is determined by AP.
|
||||
In maximum power save mode, station wakes up every listen interval to receive beacon. 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.
|
||||
|
||||
config EXAMPLE_POWER_SAVE_NONE
|
||||
bool "none"
|
||||
|
||||
config EXAMPLE_POWER_SAVE_MIN_MODEM
|
||||
bool "minimum modem"
|
||||
|
||||
config EXAMPLE_POWER_SAVE_MAX_MODEM
|
||||
bool "maximum modem"
|
||||
|
||||
endchoice # EXAMPLE_POWER_SAVE_MODE
|
||||
|
||||
config ESP32_WIFI_WLAN_BUFFER_OPTIMIZATION
|
||||
bool "Enable optimization of WLAN driver buffer"
|
||||
default n
|
||||
---help---
|
||||
Enable optimization of WLAN memory
|
||||
|
||||
endmenu # ESP32_WIFI
|
||||
|
||||
menu "BLE Configuration"
|
||||
depends on ESP32_BLE
|
||||
|
||||
config ESP32_BLE_PKTBUF_NUM
|
||||
int "BLE netcard packet buffer number per netcard"
|
||||
default 16
|
||||
|
||||
config ESP32_BLE_TASK_STACK_SIZE
|
||||
int "Controller task stack size"
|
||||
default 4096
|
||||
|
||||
config ESP32_BLE_TASK_PRIORITY
|
||||
int "Controller task priority"
|
||||
default 110
|
||||
|
||||
config ESP32_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.
|
||||
|
||||
config ESP32_BLE_MAX_CONN
|
||||
int "Maximum BLE simultaneous connections"
|
||||
range 1 3
|
||||
default 1
|
||||
|
||||
endmenu # BLE Configuration
|
||||
|
||||
choice ESP32_UNIVERSAL_MAC_ADDRESSES
|
||||
bool "Number of universally administered (by IEEE) MAC addresses"
|
||||
default ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR
|
||||
depends on ESP32_WIFI || ESP32_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
|
||||
|
|
|
|||
|
|
@ -206,6 +206,20 @@ ifeq ($(CONFIG_ESP32_OPENETH),y)
|
|||
CHIP_CSRCS += esp_openeth.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)
|
||||
CHIP_CSRCS += esp32_wifi_adapter.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_BLE),y)
|
||||
CHIP_CSRCS += esp32_ble_adapter.c esp32_ble.c
|
||||
EXTRA_LIBS += -lbtdm_app
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP32_ESPNOW_PKTRADIO),y)
|
||||
CHIP_CSRCS += esp32_espnow_pktradio.c
|
||||
EXTRA_LIBS += -lespnow
|
||||
endif
|
||||
|
||||
#############################################################################
|
||||
# Espressif HAL for 3rd Party Platforms
|
||||
#############################################################################
|
||||
|
|
@ -214,7 +228,7 @@ endif
|
|||
|
||||
ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
|
||||
ifndef ESP_HAL_3RDPARTY_VERSION
|
||||
ESP_HAL_3RDPARTY_VERSION = 2388ce5663ad4ffe7aecc8ad8b73851e9f0dcc9b
|
||||
ESP_HAL_3RDPARTY_VERSION = e5cef265cca9d272c428d210453d574bcc25c5f4
|
||||
endif
|
||||
|
||||
ifndef ESP_HAL_3RDPARTY_URL
|
||||
|
|
@ -264,7 +278,7 @@ include chip/hal.mk
|
|||
include common/espressif/Make.defs
|
||||
|
||||
context:: chip/$(ESP_HAL_3RDPARTY_REPO)
|
||||
ifeq ($(CONFIG_ESP32_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_esp32 components/esp_coex/lib
|
||||
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls reset --quiet --hard
|
||||
|
|
@ -272,10 +286,6 @@ ifeq ($(CONFIG_ESP32_WIRELESS),y)
|
|||
$(Q) cd chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls && git apply ../../../nuttx/patches/components/mbedtls/mbedtls/*.patch
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP32_WIRELESS),y)
|
||||
include chip/Wireless.mk
|
||||
endif
|
||||
|
||||
distclean::
|
||||
$(call DELDIR,chip/$(ESP_HAL_3RDPARTY_REPO))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,260 +0,0 @@
|
|||
############################################################################
|
||||
# arch/xtensa/src/esp32/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)$(CHIP_SERIES)$(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)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_esp32$(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 += -lrtc -lphy -lcoexist
|
||||
|
||||
# Wireless interfaces.
|
||||
|
||||
CHIP_CSRCS += esp32_wireless.c
|
||||
|
||||
ifeq ($(CONFIG_ESP32_BLE),y)
|
||||
CHIP_CSRCS += esp32_ble_adapter.c esp32_ble.c
|
||||
EXTRA_LIBS += -lbtdm_app
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP32_WIFI),y)
|
||||
CHIP_CSRCS += esp32_wlan.c esp32_wifi_utils.c esp32_wifi_adapter.c
|
||||
EXTRA_LIBS += -lcore -lnet80211 -lpp
|
||||
|
||||
ifeq ($(CONFIG_ESP32_ESPNOW_PKTRADIO),y)
|
||||
CHIP_CSRCS += esp32_espnow_pktradio.c
|
||||
EXTRA_LIBS += -lespnow
|
||||
endif
|
||||
|
||||
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
|
||||
|
|
@ -236,7 +236,7 @@ void xtensa_add_region(void)
|
|||
MM_ADDREGION(start, size);
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ESP32_BLE
|
||||
#ifndef CONFIG_ESPRESSIF_BLE
|
||||
start = (void *)HEAP_REGION0_START;
|
||||
size = (size_t)(HEAP_REGION0_END - HEAP_REGION0_START);
|
||||
MM_ADDREGION(start, size);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
#include "xtensa_attr.h"
|
||||
#include "utils/memory_reserve.h"
|
||||
#include "esp32_rt_timer.h"
|
||||
#include "esp32_wireless.h"
|
||||
#include "espressif/esp_wireless.h"
|
||||
#include "esp32_irq.h"
|
||||
#include "esp32_spicache.h"
|
||||
|
||||
|
|
@ -127,8 +127,8 @@
|
|||
# define BLE_TASK_EVENT_QUEUE_LEN 8
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE_INTERRUPT_SAVE_STATUS
|
||||
# define NR_IRQSTATE_FLAGS CONFIG_ESP32_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
|
||||
|
|
@ -1958,7 +1958,7 @@ static int IRAM_ATTR coex_bt_request_wrapper(uint32_t event,
|
|||
uint32_t latency,
|
||||
uint32_t duration)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_bt_request(event, latency, duration);
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -1981,7 +1981,7 @@ static int IRAM_ATTR coex_bt_request_wrapper(uint32_t event,
|
|||
|
||||
static int IRAM_ATTR coex_bt_release_wrapper(uint32_t event)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_bt_release(event);
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -2005,7 +2005,7 @@ static int IRAM_ATTR coex_bt_release_wrapper(uint32_t event)
|
|||
|
||||
static int adapter_coex_register_bt_cb_wrapper(coex_func_cb_t cb)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_register_bt_cb(cb);
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -2029,7 +2029,7 @@ static int adapter_coex_register_bt_cb_wrapper(coex_func_cb_t cb)
|
|||
|
||||
static uint32_t IRAM_ATTR coex_bb_reset_lock_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_bb_reset_lock();
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -2054,7 +2054,7 @@ static uint32_t IRAM_ATTR coex_bb_reset_lock_wrapper(void)
|
|||
|
||||
static void IRAM_ATTR coex_bb_reset_unlock_wrapper(uint32_t restore)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
coex_bb_reset_unlock(restore);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -2075,7 +2075,7 @@ static void IRAM_ATTR coex_bb_reset_unlock_wrapper(uint32_t restore)
|
|||
|
||||
static int coex_schm_register_btdm_callback_wrapper(void *callback)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_schm_register_callback(COEX_SCHM_CALLBACK_TYPE_BT, callback);
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -2100,7 +2100,7 @@ static int coex_schm_register_btdm_callback_wrapper(void *callback)
|
|||
static void coex_schm_status_bit_clear_wrapper(uint32_t type,
|
||||
uint32_t status)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
coex_schm_status_bit_clear(type, status);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -2122,7 +2122,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_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
coex_schm_status_bit_set(type, status);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -2143,7 +2143,7 @@ static void coex_schm_status_bit_set_wrapper(uint32_t type, uint32_t status)
|
|||
|
||||
static uint32_t coex_schm_interval_get_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_schm_interval_get();
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -2166,7 +2166,7 @@ static uint32_t coex_schm_interval_get_wrapper(void)
|
|||
|
||||
static uint8_t coex_schm_curr_period_get_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_schm_interval_get();
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -2189,7 +2189,7 @@ static uint8_t coex_schm_curr_period_get_wrapper(void)
|
|||
|
||||
static void *coex_schm_curr_phase_get_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_schm_curr_phase_get();
|
||||
#else
|
||||
return NULL;
|
||||
|
|
@ -2214,7 +2214,7 @@ static void *coex_schm_curr_phase_get_wrapper(void)
|
|||
static int coex_wifi_channel_get_wrapper(uint8_t *primary,
|
||||
uint8_t *secondary)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_wifi_channel_get(primary, secondary);
|
||||
#else
|
||||
return -1;
|
||||
|
|
@ -2238,7 +2238,7 @@ static int coex_wifi_channel_get_wrapper(uint8_t *primary,
|
|||
|
||||
static int coex_register_wifi_channel_change_callback_wrapper(void *cb)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_register_wifi_channel_change_callback(cb);
|
||||
#else
|
||||
return -1;
|
||||
|
|
@ -2265,7 +2265,7 @@ static int coex_version_get_wrapper(unsigned int *major,
|
|||
unsigned int *minor,
|
||||
unsigned int *patch)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
coex_version_t version;
|
||||
|
||||
ASSERT(coex_version_get_value(&version) == ESP_OK);
|
||||
|
|
@ -2944,8 +2944,8 @@ int esp32_bt_controller_init(void)
|
|||
|
||||
/* overwrite some parameters */
|
||||
|
||||
cfg.controller_task_stack_size = CONFIG_ESP32_BLE_TASK_STACK_SIZE;
|
||||
cfg.controller_task_prio = CONFIG_ESP32_BLE_TASK_PRIORITY;
|
||||
cfg.controller_task_stack_size = CONFIG_ESPRESSIF_BLE_TASK_STACK_SIZE;
|
||||
cfg.controller_task_prio = CONFIG_ESPRESSIF_BLE_TASK_PRIORITY;
|
||||
cfg.bt_max_sync_conn = CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF;
|
||||
cfg.magic = ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL;
|
||||
|
||||
|
|
@ -3062,7 +3062,7 @@ int esp32_bt_controller_init(void)
|
|||
g_pm_lock_acquired = true;
|
||||
#endif
|
||||
|
||||
#if CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#if CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
coex_init();
|
||||
#endif
|
||||
|
||||
|
|
@ -3162,7 +3162,7 @@ int esp32_bt_controller_enable(esp_bt_mode_t mode)
|
|||
|
||||
esp_phy_enable(PHY_MODEM_BT);
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
coex_enable();
|
||||
#endif
|
||||
|
||||
|
|
@ -3180,7 +3180,7 @@ int esp32_bt_controller_enable(esp_bt_mode_t mode)
|
|||
ret = btdm_controller_enable(mode);
|
||||
if (ret != 0)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
coex_disable();
|
||||
#endif
|
||||
esp_phy_disable(PHY_MODEM_BT);
|
||||
|
|
@ -3236,7 +3236,7 @@ int esp32_bt_controller_disable(void)
|
|||
|
||||
btdm_controller_disable();
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
coex_disable();
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -100,13 +100,13 @@
|
|||
#define ESP32_MAX_PRIORITY 5
|
||||
#define ESP32_PRIO_INDEX(p) ((p) - ESP32_MIN_PRIORITY)
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
# define ESP32_WIFI_RESERVE_INT (1 << ESP32_CPUINT_MAC)
|
||||
#else
|
||||
# define ESP32_WIFI_RESERVE_INT 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
# define ESP32_BLE_RESERVE_INT ((1 << ESP32_PERIPH_BT_BB_NMI) | \
|
||||
(1 << ESP32_PERIPH_RWBLE_IRQ) | \
|
||||
(1 << ESP32_PERIPH_RWBT_NMI))
|
||||
|
|
@ -520,11 +520,11 @@ void up_irqinitialize(void)
|
|||
g_irqmap[XTENSA_IRQ_SWINT] = IRQ_MKMAP(0, ESP32_CPUINT_SOFTWARE1);
|
||||
g_irqmap[XTENSA_IRQ_SWINT] = IRQ_MKMAP(1, ESP32_CPUINT_SOFTWARE1);
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
g_irqmap[ESP32_IRQ_MAC] = IRQ_MKMAP(0, ESP32_CPUINT_MAC);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
g_irqmap[ESP32_IRQ_BT_BB_NMI] = IRQ_MKMAP(0, ESP32_PERIPH_BT_BB_NMI);
|
||||
g_irqmap[ESP32_IRQ_RWBT_NMI] = IRQ_MKMAP(0, ESP32_PERIPH_RWBT_NMI);
|
||||
g_irqmap[ESP32_IRQ_RWBLE_IRQ] = IRQ_MKMAP(0, ESP32_PERIPH_RWBLE_IRQ);
|
||||
|
|
@ -536,12 +536,12 @@ void up_irqinitialize(void)
|
|||
|
||||
/* Reserve CPU0 interrupt for some special drivers */
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
g_cpu0_intmap[ESP32_CPUINT_MAC] = CPUINT_ASSIGN(ESP32_IRQ_MAC);
|
||||
xtensa_enable_cpuint(&g_intenable[0], 1 << ESP32_CPUINT_MAC);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
g_cpu0_intmap[ESP32_PERIPH_BT_BB_NMI] = CPUINT_ASSIGN(ESP32_IRQ_BT_BB_NMI);
|
||||
g_cpu0_intmap[ESP32_PERIPH_RWBT_NMI] = CPUINT_ASSIGN(ESP32_IRQ_RWBT_NMI);
|
||||
g_cpu0_intmap[ESP32_PERIPH_RWBLE_IRQ] = CPUINT_ASSIGN(ESP32_IRQ_RWBLE_IRQ);
|
||||
|
|
|
|||
|
|
@ -58,19 +58,19 @@
|
|||
#include "hardware/esp32_dport.h"
|
||||
#include "hardware/esp32_emac.h"
|
||||
#include "esp32_irq.h"
|
||||
#include "esp32_wireless.h"
|
||||
#include "espressif/esp_wireless.h"
|
||||
#include "esp32_wifi_adapter.h"
|
||||
#include "esp32_rt_timer.h"
|
||||
#include "esp32_wifi_utils.h"
|
||||
#include "esp32_wlan.h"
|
||||
#include "espressif/esp_wifi_utils.h"
|
||||
#include "espressif/esp_wlan.h"
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
# include "esp32_pm.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
# include "esp32_ble_adapter.h"
|
||||
# ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
# ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
# include "private/esp_coexist_internal.h"
|
||||
# endif
|
||||
#endif
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
|
||||
#define PHY_RF_MASK ((1 << PHY_BT_MODULE) | (1 << PHY_WIFI_MODULE))
|
||||
|
||||
#define WIFI_CONNECT_TIMEOUT CONFIG_ESP32_WIFI_CONNECT_TIMEOUT
|
||||
#define WIFI_CONNECT_TIMEOUT CONFIG_ESPRESSIF_WIFI_CONNECT_TIMEOUT
|
||||
|
||||
#define TIMER_INITIALIZED_VAL (0x5aa5a55a)
|
||||
|
||||
|
|
@ -111,11 +111,11 @@
|
|||
|
||||
/* CONFIG_POWER_SAVE_MODEM */
|
||||
|
||||
#if defined(CONFIG_ESP32_POWER_SAVE_MIN_MODEM)
|
||||
#if defined(CONFIG_ESPRESSIF_POWER_SAVE_MIN_MODEM)
|
||||
# define DEFAULT_PS_MODE WIFI_PS_MIN_MODEM
|
||||
#elif defined(CONFIG_ESP32_POWER_SAVE_MAX_MODEM)
|
||||
#elif defined(CONFIG_ESPRESSIF_POWER_SAVE_MAX_MODEM)
|
||||
# define DEFAULT_PS_MODE WIFI_PS_MAX_MODEM
|
||||
#elif defined(CONFIG_ESP32_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
|
||||
|
|
@ -193,11 +193,11 @@ struct nvs_adpt
|
|||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_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_ESP32_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,
|
||||
|
|
@ -360,7 +360,7 @@ static mutex_t g_wifiexcl_lock = NXMUTEX_INITIALIZER;
|
|||
|
||||
static int g_wifi_ref;
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_STA
|
||||
#ifdef ESPRESSIF_WLAN_HAS_STA
|
||||
|
||||
/* If reconnect automatically */
|
||||
|
||||
|
|
@ -382,9 +382,9 @@ static wifi_txdone_cb_t g_sta_txdone_cb;
|
|||
|
||||
static wifi_config_t g_sta_wifi_cfg;
|
||||
|
||||
#endif /* ESP32_WLAN_HAS_STA */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_STA */
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_SOFTAP
|
||||
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
|
||||
|
||||
/* If Wi-Fi SoftAP starts */
|
||||
|
||||
|
|
@ -398,7 +398,7 @@ static wifi_txdone_cb_t g_softap_txdone_cb;
|
|||
|
||||
static wifi_config_t g_softap_wifi_cfg;
|
||||
|
||||
#endif /* ESP32_WLAN_HAS_SOFTAP */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
|
||||
|
||||
/* Device specific lock */
|
||||
|
||||
|
|
@ -410,7 +410,7 @@ static spinlock_t g_lock;
|
|||
|
||||
/* Wi-Fi and BT coexistence OS adapter data */
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
coex_adapter_funcs_t g_coex_adapter_funcs =
|
||||
{
|
||||
._version = COEX_ADAPTER_VERSION,
|
||||
|
|
@ -435,7 +435,7 @@ coex_adapter_funcs_t g_coex_adapter_funcs =
|
|||
._timer_arm_us = esp_timer_arm_us,
|
||||
._magic = COEX_ADAPTER_MAGIC,
|
||||
};
|
||||
#endif /* CONFIG_ESP32_WIFI_BT_COEXIST */
|
||||
#endif /* CONFIG_ESPRESSIF_WIFI_BT_COEXIST */
|
||||
|
||||
/* Wi-Fi OS adapter data */
|
||||
|
||||
|
|
@ -499,7 +499,7 @@ wifi_osi_funcs_t g_wifi_osi_funcs =
|
|||
._phy_enable = esp_phy_enable_wrapper,
|
||||
._phy_common_clock_enable = esp_phy_common_clock_enable,
|
||||
._phy_common_clock_disable = esp_phy_common_clock_disable,
|
||||
._phy_update_country_info = esp32_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,
|
||||
|
|
@ -2043,7 +2043,7 @@ static int esp_event_id_map(int event_id)
|
|||
id = WIFI_ADPT_EVT_SCAN_DONE;
|
||||
break;
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_STA
|
||||
#ifdef ESPRESSIF_WLAN_HAS_STA
|
||||
case WIFI_EVENT_STA_START:
|
||||
id = WIFI_ADPT_EVT_STA_START;
|
||||
break;
|
||||
|
|
@ -2063,9 +2063,9 @@ static int esp_event_id_map(int event_id)
|
|||
case WIFI_EVENT_STA_STOP:
|
||||
id = WIFI_ADPT_EVT_STA_STOP;
|
||||
break;
|
||||
#endif /* ESP32_WLAN_HAS_STA */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_STA */
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_SOFTAP
|
||||
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
|
||||
case WIFI_EVENT_AP_START:
|
||||
id = WIFI_ADPT_EVT_AP_START;
|
||||
break;
|
||||
|
|
@ -2081,7 +2081,7 @@ static int esp_event_id_map(int event_id)
|
|||
case WIFI_EVENT_AP_STADISCONNECTED:
|
||||
id = WIFI_ADPT_EVT_AP_STADISCONNECTED;
|
||||
break;
|
||||
#endif /* ESP32_WLAN_HAS_SOFTAP */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
|
||||
|
||||
default:
|
||||
return -1;
|
||||
|
|
@ -2122,7 +2122,7 @@ static void esp_evt_work_cb(void *arg)
|
|||
break;
|
||||
}
|
||||
|
||||
/* Some of the following logic (eg. esp32_wlan_sta_set_linkstatus)
|
||||
/* Some of the following logic (eg. esp_wlan_sta_set_linkstatus)
|
||||
* can take net_lock(). To maintain the consistent locking order,
|
||||
* we take net_lock() here before taking esp_wifi_lock. Note that
|
||||
* net_lock() is a recursive lock.
|
||||
|
|
@ -2137,13 +2137,13 @@ static void esp_evt_work_cb(void *arg)
|
|||
esp_wifi_scan_event_parse();
|
||||
break;
|
||||
|
||||
#ifdef ESP32_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_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
if (esp32_bt_controller_get_status() !=
|
||||
ESP_BT_CONTROLLER_STATUS_IDLE)
|
||||
{
|
||||
|
|
@ -2175,7 +2175,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 = esp32_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");
|
||||
|
|
@ -2186,7 +2186,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 = esp32_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");
|
||||
|
|
@ -2206,13 +2206,13 @@ static void esp_evt_work_cb(void *arg)
|
|||
wlinfo("Wi-Fi sta stop\n");
|
||||
g_sta_connected = false;
|
||||
break;
|
||||
#endif /* ESP32_WLAN_HAS_STA */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_STA */
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_SOFTAP
|
||||
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
|
||||
case WIFI_ADPT_EVT_AP_START:
|
||||
wlinfo("INFO: Wi-Fi softap start\n");
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
if (esp32_bt_controller_get_status() !=
|
||||
ESP_BT_CONTROLLER_STATUS_IDLE)
|
||||
{
|
||||
|
|
@ -2252,7 +2252,7 @@ static void esp_evt_work_cb(void *arg)
|
|||
case WIFI_ADPT_EVT_AP_STADISCONNECTED:
|
||||
wlinfo("INFO: Wi-Fi station leave\n");
|
||||
break;
|
||||
#endif /* ESP32_WLAN_HAS_SOFTAP */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -2278,7 +2278,7 @@ static void esp_evt_work_cb(void *arg)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
|
||||
/****************************************************************************
|
||||
* Name: semphr_take_from_isr_wrapper
|
||||
|
|
@ -2343,7 +2343,7 @@ static int IRAM_ATTR is_in_isr_wrapper(void)
|
|||
return up_interrupt_context();
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ESP32_WIFI_BT_COEXIST */
|
||||
#endif /* CONFIG_ESPRESSIF_WIFI_BT_COEXIST */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: wifi_env_is_chip
|
||||
|
|
@ -3619,7 +3619,7 @@ static void esp_wifi_delete_queue(void *queue)
|
|||
|
||||
static int coex_init_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_init();
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -3642,7 +3642,7 @@ static int coex_init_wrapper(void)
|
|||
|
||||
static void coex_deinit_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
coex_deinit();
|
||||
#endif
|
||||
}
|
||||
|
|
@ -3664,7 +3664,7 @@ static void coex_deinit_wrapper(void)
|
|||
|
||||
static int coex_enable_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_enable();
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -3687,7 +3687,7 @@ static int coex_enable_wrapper(void)
|
|||
|
||||
static void coex_disable_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
coex_disable();
|
||||
#endif
|
||||
}
|
||||
|
|
@ -3709,7 +3709,7 @@ static void coex_disable_wrapper(void)
|
|||
|
||||
static IRAM_ATTR uint32_t coex_status_get_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_status_get();
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -3736,7 +3736,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_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_wifi_request(event, latency, duration);
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -3760,7 +3760,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_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_wifi_release(event);
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -3785,7 +3785,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_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_wifi_channel_set(primary, secondary);
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -3811,7 +3811,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_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_event_duration_get(event, duration);
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -3857,7 +3857,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_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
coex_schm_status_bit_clear(type, status);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -3879,7 +3879,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_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
coex_schm_status_bit_set(type, status);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -3901,7 +3901,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_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_schm_interval_set(interval);
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -3924,7 +3924,7 @@ static IRAM_ATTR int coex_schm_interval_set_wrapper(uint32_t interval)
|
|||
|
||||
static uint32_t coex_schm_interval_get_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_schm_interval_get();
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -3947,7 +3947,7 @@ static uint32_t coex_schm_interval_get_wrapper(void)
|
|||
|
||||
static uint8_t coex_schm_curr_period_get_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_schm_curr_period_get();
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -3970,7 +3970,7 @@ static uint8_t coex_schm_curr_period_get_wrapper(void)
|
|||
|
||||
static void *coex_schm_curr_phase_get_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_schm_curr_phase_get();
|
||||
#else
|
||||
return NULL;
|
||||
|
|
@ -3994,7 +3994,7 @@ static void *coex_schm_curr_phase_get_wrapper(void)
|
|||
|
||||
static int coex_register_start_cb_wrapper(int (* cb)(void))
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_register_start_cb(cb);
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -4018,7 +4018,7 @@ static int coex_register_start_cb_wrapper(int (* cb)(void))
|
|||
|
||||
static int coex_schm_process_restart_wrapper(void)
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_schm_process_restart();
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -4043,7 +4043,7 @@ static int coex_schm_process_restart_wrapper(void)
|
|||
|
||||
static int coex_schm_register_cb_wrapper(int type, int(*cb)(int))
|
||||
{
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
return coex_schm_register_callback(type, cb);
|
||||
#else
|
||||
return 0;
|
||||
|
|
@ -4145,7 +4145,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 ESP32_WLAN_HAS_STA
|
||||
#ifdef ESPRESSIF_WLAN_HAS_STA
|
||||
if (ifidx == ESP_IF_WIFI_STA)
|
||||
{
|
||||
if (g_sta_txdone_cb)
|
||||
|
|
@ -4154,9 +4154,9 @@ static IRAM_ATTR void esp_wifi_tx_done_cb(uint8_t ifidx, uint8_t *data,
|
|||
}
|
||||
}
|
||||
else
|
||||
#endif /* ESP32_WLAN_HAS_STA */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_STA */
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_SOFTAP
|
||||
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
|
||||
if (ifidx == ESP_IF_WIFI_AP)
|
||||
{
|
||||
if (g_softap_txdone_cb)
|
||||
|
|
@ -4165,13 +4165,13 @@ static IRAM_ATTR void esp_wifi_tx_done_cb(uint8_t ifidx, uint8_t *data,
|
|||
}
|
||||
}
|
||||
else
|
||||
#endif /* ESP32_WLAN_HAS_SOFTAP */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
|
||||
{
|
||||
wlerr("ifidx=%d is error\n", ifidx);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_STA
|
||||
#ifdef ESPRESSIF_WLAN_HAS_STA
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_auth_trans
|
||||
|
|
@ -4273,7 +4273,7 @@ static int esp_wifi_cipher_trans(uint32_t wifi_cipher)
|
|||
return cipher_mode;
|
||||
}
|
||||
|
||||
#endif /* ESP32_WLAN_HAS_STA */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_STA */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_freq_to_channel
|
||||
|
|
@ -4609,28 +4609,28 @@ int esp_wifi_adapter_init(void)
|
|||
|
||||
wifi_cfg.nvs_enable = 0;
|
||||
|
||||
#ifdef CONFIG_ESP32_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_ESP32_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_ESP32_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_ESP32_WIFI_RXBA_AMPDU_WZ;
|
||||
wifi_cfg.static_rx_buf_num = CONFIG_ESP32_WIFI_STATIC_RXBUF_NUM;
|
||||
wifi_cfg.dynamic_rx_buf_num = CONFIG_ESP32_WIFI_DYNAMIC_RXBUF_NUM;
|
||||
wifi_cfg.dynamic_tx_buf_num = CONFIG_ESP32_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)
|
||||
|
|
@ -4668,7 +4668,7 @@ errout_init_wifi:
|
|||
* Station functions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_STA
|
||||
#ifdef ESPRESSIF_WLAN_HAS_STA
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_start
|
||||
|
|
@ -4698,13 +4698,13 @@ int esp_wifi_sta_start(void)
|
|||
wlinfo("Failed to stop Wi-Fi ret=%d\n", ret);
|
||||
}
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_SOFTAP
|
||||
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
|
||||
if (g_softap_started)
|
||||
{
|
||||
mode = WIFI_MODE_APSTA;
|
||||
}
|
||||
else
|
||||
#endif /* ESP32_WLAN_HAS_SOFTAP */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
|
||||
{
|
||||
mode = WIFI_MODE_STA;
|
||||
}
|
||||
|
|
@ -4763,7 +4763,7 @@ int esp_wifi_sta_stop(void)
|
|||
|
||||
g_sta_started = false;
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_SOFTAP
|
||||
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
|
||||
if (g_softap_started)
|
||||
{
|
||||
ret = esp_wifi_set_mode(WIFI_MODE_AP);
|
||||
|
|
@ -4782,13 +4782,13 @@ int esp_wifi_sta_stop(void)
|
|||
goto errout;
|
||||
}
|
||||
}
|
||||
#endif /* ESP32_WLAN_HAS_SOFTAP */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
|
||||
|
||||
wlinfo("OK to stop Wi-Fi station\n");
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_SOFTAP
|
||||
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
|
||||
errout:
|
||||
#endif /* ESP32_WLAN_HAS_SOFTAP */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
|
||||
|
||||
esp_wifi_lock(false);
|
||||
return ret;
|
||||
|
|
@ -5663,7 +5663,7 @@ int esp_wifi_sta_bitrate(struct iwreq *iwr, bool set)
|
|||
return OK;
|
||||
}
|
||||
|
||||
#endif /* ESP32_WLAN_HAS_STA */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_STA */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_get_txpower
|
||||
|
|
@ -5858,7 +5858,7 @@ int esp_wifi_sta_country(struct iwreq *iwr, bool set)
|
|||
return OK;
|
||||
}
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_STA
|
||||
#ifdef ESPRESSIF_WLAN_HAS_STA
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_rssi
|
||||
|
|
@ -5905,13 +5905,13 @@ int esp_wifi_sta_rssi(struct iwreq *iwr, bool set)
|
|||
|
||||
return OK;
|
||||
}
|
||||
#endif /* ESP32_WLAN_HAS_STA */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_STA */
|
||||
|
||||
/****************************************************************************
|
||||
* SoftAP functions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_SOFTAP
|
||||
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_start
|
||||
|
|
@ -5941,13 +5941,13 @@ int esp_wifi_softap_start(void)
|
|||
wlinfo("Failed to stop Wi-Fi ret=%d\n", ret);
|
||||
}
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_STA
|
||||
#ifdef ESPRESSIF_WLAN_HAS_STA
|
||||
if (g_sta_started)
|
||||
{
|
||||
mode = WIFI_MODE_APSTA;
|
||||
}
|
||||
else
|
||||
#endif /* ESP32_WLAN_HAS_STA */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_STA */
|
||||
{
|
||||
mode = WIFI_MODE_AP;
|
||||
}
|
||||
|
|
@ -6006,7 +6006,7 @@ int esp_wifi_softap_stop(void)
|
|||
|
||||
g_softap_started = false;
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_STA
|
||||
#ifdef ESPRESSIF_WLAN_HAS_STA
|
||||
if (g_sta_started)
|
||||
{
|
||||
ret = esp_wifi_set_mode(WIFI_MODE_STA);
|
||||
|
|
@ -6025,13 +6025,13 @@ int esp_wifi_softap_stop(void)
|
|||
goto errout;
|
||||
}
|
||||
}
|
||||
#endif /* ESP32_WLAN_HAS_STA */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_STA */
|
||||
|
||||
wlinfo("OK to stop Wi-Fi SoftAP\n");
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_STA
|
||||
#ifdef ESPRESSIF_WLAN_HAS_STA
|
||||
errout:
|
||||
#endif /* ESP32_WLAN_HAS_STA */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_STA */
|
||||
|
||||
esp_wifi_lock(false);
|
||||
return ret;
|
||||
|
|
@ -6670,7 +6670,7 @@ int esp_wifi_softap_rssi(struct iwreq *iwr, bool set)
|
|||
return -ENOSYS;
|
||||
}
|
||||
|
||||
#endif /* ESP32_WLAN_HAS_SOFTAP */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32_wifi_bt_coexist_init
|
||||
|
|
@ -6687,7 +6687,7 @@ int esp_wifi_softap_rssi(struct iwreq *iwr, bool set)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
int esp32_wifi_bt_coexist_init(void)
|
||||
{
|
||||
esp_coex_adapter_register(&g_coex_adapter_funcs);
|
||||
|
|
@ -6695,7 +6695,7 @@ int esp32_wifi_bt_coexist_init(void)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_ESP32_WIFI_BT_COEXIST */
|
||||
#endif /* CONFIG_ESPRESSIF_WIFI_BT_COEXIST */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_stop_callback
|
||||
|
|
|
|||
|
|
@ -45,20 +45,20 @@ extern "C"
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_ESP32_WIFI_STATION)
|
||||
# define ESP32_WLAN_HAS_STA
|
||||
# define ESP32_WLAN_STA_DEVNO 0
|
||||
# define ESP32_WLAN_DEVS 1
|
||||
#elif defined(CONFIG_ESP32_WIFI_SOFTAP)
|
||||
# define ESP32_WLAN_HAS_SOFTAP
|
||||
# define ESP32_WLAN_SOFTAP_DEVNO 0
|
||||
# define ESP32_WLAN_DEVS 1
|
||||
#elif defined(CONFIG_ESP32_WIFI_STATION_SOFTAP)
|
||||
# define ESP32_WLAN_HAS_STA
|
||||
# define ESP32_WLAN_HAS_SOFTAP
|
||||
# define ESP32_WLAN_STA_DEVNO 0
|
||||
# define ESP32_WLAN_SOFTAP_DEVNO 1
|
||||
# define ESP32_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)
|
||||
|
|
@ -160,7 +160,7 @@ void esp_wifi_free_eb(void *eb);
|
|||
|
||||
int esp_wifi_notify_subscribe(pid_t pid, struct sigevent *event);
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_STA
|
||||
#ifdef ESPRESSIF_WLAN_HAS_STA
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_sta_start
|
||||
|
|
@ -496,9 +496,9 @@ int esp_wifi_sta_country(struct iwreq *iwr, bool set);
|
|||
****************************************************************************/
|
||||
|
||||
int esp_wifi_sta_rssi(struct iwreq *iwr, bool set);
|
||||
#endif /* ESP32_WLAN_HAS_STA */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_STA */
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_SOFTAP
|
||||
#ifdef ESPRESSIF_WLAN_HAS_SOFTAP
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_wifi_softap_start
|
||||
|
|
@ -834,7 +834,7 @@ int esp_wifi_softap_country(struct iwreq *iwr, bool set);
|
|||
****************************************************************************/
|
||||
|
||||
int esp_wifi_softap_rssi(struct iwreq *iwr, bool set);
|
||||
#endif /* ESP32_WLAN_HAS_SOFTAP */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32_wifi_bt_coexist_init
|
||||
|
|
@ -851,7 +851,7 @@ int esp_wifi_softap_rssi(struct iwreq *iwr, bool set);
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
int esp32_wifi_bt_coexist_init(void);
|
||||
void coex_dbg_set_log_level(int level);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,573 +0,0 @@
|
|||
/****************************************************************************
|
||||
* arch/xtensa/src/esp32/esp32_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 "esp32_wifi_adapter.h"
|
||||
#include "esp32_wifi_utils.h"
|
||||
#include "esp32_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 "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_ESP32_WIFI_SCAN_RESULT_SIZE
|
||||
# define WIFI_SCAN_RESULT_SIZE CONFIG_ESP32_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);
|
||||
}
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
/****************************************************************************
|
||||
* arch/xtensa/src/esp32/esp32_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_ESP32_ESP32_WIFI_UTILS_H
|
||||
#define __ARCH_XTENSA_SRC_ESP32_ESP32_WIFI_UTILS_H
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#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_ESP32_ESP32_WIFI_UTILS_H */
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,376 +0,0 @@
|
|||
/****************************************************************************
|
||||
* arch/xtensa/src/esp32/esp32_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_ESP32_ESP32_WIRELESS_H
|
||||
#define __ARCH_XTENSA_SRC_ESP32_ESP32_WIRELESS_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
#include <semaphore.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/list.h>
|
||||
|
||||
#include "xtensa_attr.h"
|
||||
#include "esp32_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
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ESP32_SUPPORT_MULTIPLE_PHY_INIT_DATA
|
||||
# undef CONFIG_ESP32_SUPPORT_MULTIPLE_PHY_INIT_DATA_BIN
|
||||
# define CONFIG_ESP32_SUPPORT_MULTIPLE_PHY_INIT_DATA_BIN 1
|
||||
#endif
|
||||
#define CONFIG_MAC_BB_PD 0
|
||||
#define SOC_COEX_HW_PTI 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: esp32_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 esp32_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
|
||||
* len - Queue cache max length
|
||||
* 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 len,
|
||||
size_t size);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32_wl_send_queuecache
|
||||
*
|
||||
* Description:
|
||||
* Store posting queue action and data into queue cache.
|
||||
*
|
||||
* Parameters:
|
||||
* queue - Pointer to the queue
|
||||
* buffer - Data buffer
|
||||
* size - Buffer size
|
||||
*
|
||||
* Returned Value:
|
||||
* None.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void esp_send_queuecache(void *queue, 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_ESP32_ESP32_WIRELESS_H */
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,125 +0,0 @@
|
|||
/****************************************************************************
|
||||
* arch/xtensa/src/esp32/esp32_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_ESP32_ESP32_WLAN_H
|
||||
#define __ARCH_XTENSA_SRC_ESP32_ESP32_WLAN_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include "esp32_wifi_adapter.h"
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32_wlan_sta_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the esp32 WLAN station netcard driver
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; Negated errno on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_STA
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32_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 esp32_wlan_sta_set_linkstatus(bool linkstatus);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32_wlan_sta_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the ESP32 WLAN station netcard driver
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; Negated errno on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp32_wlan_sta_initialize(void);
|
||||
#endif /* ESP32_WLAN_HAS_STA */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32_wlan_softap_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the esp32 WLAN softAP netcard driver
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; Negated errno on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_SOFTAP
|
||||
int esp32_wlan_softap_initialize(void);
|
||||
#endif /* ESP32_WLAN_HAS_SOFTAP */
|
||||
|
||||
#endif /* CONFIG_ESP32_WIFI */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#undef EXTERN
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_XTENSA_SRC_ESP32_ESP32_WLAN_H */
|
||||
|
|
@ -48,7 +48,7 @@ extern "C"
|
|||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_wlan_init
|
||||
|
|
@ -64,7 +64,7 @@ extern "C"
|
|||
|
||||
int board_wlan_init(void);
|
||||
|
||||
#endif /* CONFIG_ESP32_WIFI */
|
||||
#endif /* CONFIG_ESPRESSIF_WIFI */
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ PROVIDE( cache_read_enable = Cache_Read_Enable_rom );
|
|||
|
||||
/* Bluetooth needs symbol alias, to be removed after IDF rename it */
|
||||
|
||||
#ifdef CONFIG_ESP32_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;
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ SECTIONS
|
|||
*(.srodata.*)
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
#ifdef CONFIG_ESP32_WIRELESS
|
||||
#ifdef CONFIG_ESPRESSIF_WIRELESS
|
||||
*(.rodata_wlog_verbose.*)
|
||||
*(.rodata_wlog_debug.*)
|
||||
*(.rodata_wlog_info.*)
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ SECTIONS
|
|||
_srodata = ABSOLUTE(.);
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
#ifdef CONFIG_ESP32_WIRELESS
|
||||
#ifdef CONFIG_ESPRESSIF_WIRELESS
|
||||
*(.rodata_wlog_verbose.*)
|
||||
*(.rodata_wlog_debug.*)
|
||||
*(.rodata_wlog_info.*)
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ ifeq ($(CONFIG_ESP32_SPIFLASH),y)
|
|||
CSRCS += esp32_board_spiflash.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP32_WIFI),y)
|
||||
ifeq ($(CONFIG_ESPRESSIF_WIFI),y)
|
||||
CSRCS += esp32_board_wlan.c
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#include <nuttx/wireless/wireless.h>
|
||||
|
||||
#include "esp32_spiflash.h"
|
||||
#include "esp32_wlan.h"
|
||||
#include "espressif/esp_wlan.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
|
@ -66,23 +66,23 @@ int board_wlan_init(void)
|
|||
{
|
||||
int ret = OK;
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_STA
|
||||
ret = esp32_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 /* ESP32_WLAN_HAS_STA */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_STA */
|
||||
|
||||
#ifdef ESP32_WLAN_HAS_SOFTAP
|
||||
ret = esp32_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 /* ESP32_WLAN_HAS_SOFTAP */
|
||||
#endif /* ESPRESSIF_WLAN_HAS_SOFTAP */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
# include "esp32_board_spiflash.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
# include "esp32_board_wlan.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
ret = esp32_ble_initialize();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -187,7 +187,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
ret = board_wlan_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_EXAMPLES_I2SCHAR=y
|
||||
CONFIG_EXAMPLES_I2SCHAR_TX=y
|
||||
CONFIG_EXAMPLES_I2SCHAR_TXBUFFERS=2
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=3072
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
|
|
|
|||
|
|
@ -64,11 +64,11 @@
|
|||
# include "esp32_board_spiflash.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
# include "esp32_ble.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
# include "esp32_board_wlan.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -205,7 +205,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
ret = esp32_ble_initialize();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -213,7 +213,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
ret = board_wlan_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_EXAMPLES_I2SCHAR=y
|
||||
CONFIG_EXAMPLES_I2SCHAR_TX=y
|
||||
CONFIG_EXAMPLES_I2SCHAR_TXBUFFERS=2
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_EXAMPLE_POWER_SAVE_MIN_MODEM=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ CONFIG_BUILTIN=y
|
|||
CONFIG_DRIVERS_BLUETOOTH=y
|
||||
CONFIG_DRIVERS_IEEE80211=y
|
||||
CONFIG_DRIVERS_WIRELESS=y
|
||||
CONFIG_ESP32_BLE=y
|
||||
CONFIG_ESP32_IRAM_ISR_DEBUG=y
|
||||
CONFIG_ESP32_SPIFLASH=y
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESPRESSIF_BLE=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
|
|
|
|||
|
|
@ -31,16 +31,15 @@ CONFIG_DISABLE_MQUEUE_NOTIFICATION=y
|
|||
CONFIG_DRIVERS_BLUETOOTH=y
|
||||
CONFIG_DRIVERS_IEEE80211=y
|
||||
CONFIG_DRIVERS_WIRELESS=y
|
||||
CONFIG_ESP32_BLE=y
|
||||
CONFIG_ESP32_RT_TIMER_TASK_STACK_SIZE=4096
|
||||
CONFIG_ESP32_SPIFLASH=y
|
||||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESP32_WIFI_STATION_SOFTAP=y
|
||||
CONFIG_ESPRESSIF_BLE=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI_STATION_SOFTAP=y
|
||||
CONFIG_EXAMPLES_DHCPD=y
|
||||
CONFIG_EXAMPLE_POWER_SAVE_MIN_MODEM=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
|
|
|
|||
|
|
@ -59,5 +59,4 @@ CONFIG_SYSLOG_DEFAULT=y
|
|||
CONFIG_SYSLOG_MAX_CHANNELS=2
|
||||
CONFIG_SYSTEM_I2CTOOL=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SENSORTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=3072
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_EXAMPLES_UDP=y
|
||||
CONFIG_EXAMPLES_UDP_DEVNAME="wpan0"
|
||||
CONFIG_EXAMPLES_UDP_IPv6=y
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ CONFIG_DRIVERS_WIRELESS=y
|
|||
CONFIG_ESP32_APP_FORMAT_MCUBOOT=y
|
||||
CONFIG_ESP32_SPIFLASH=y
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_EXAMPLES_MCUBOOT_UPDATE_AGENT=y
|
||||
CONFIG_EXAMPLES_MCUBOOT_UPDATE_AGENT_DL_BUFFER_SIZE=4096
|
||||
CONFIG_FS_PROCFS=y
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_EXAMPLES_MQTTC=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
|
|
|
|||
|
|
@ -55,6 +55,4 @@ CONFIG_START_YEAR=2011
|
|||
CONFIG_SYSLOG_BUFFER=y
|
||||
CONFIG_SYSTEM_I2CTOOL=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SENSORTEST=y
|
||||
CONFIG_SYSTEM_SENSORTEST_PROGNAME="sensor"
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_EXAMPLES_I2SCHAR=y
|
||||
CONFIG_EXAMPLES_I2SCHAR_BUFSIZE=960
|
||||
CONFIG_EXAMPLES_I2SCHAR_RX=y
|
||||
|
|
|
|||
|
|
@ -55,6 +55,5 @@ CONFIG_START_MONTH=12
|
|||
CONFIG_START_YEAR=2011
|
||||
CONFIG_SYSLOG_BUFFER=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_HEAP=y
|
||||
CONFIG_TESTING_SMP=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ CONFIG_START_YEAR=2011
|
|||
CONFIG_SYSLOG_BUFFER=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_HEAP=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_TESTING_SMP=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESP32_WIFI_SOFTAP=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI_SOFTAP=y
|
||||
CONFIG_EXAMPLES_DHCPD=y
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESP32_WIFI_STATION_SOFTAP=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI_STATION_SOFTAP=y
|
||||
CONFIG_EXAMPLES_DHCPD=y
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ CONFIG_ESP32_RTC_HEAP=y
|
|||
CONFIG_ESP32_SPIFLASH=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x280000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_FS_LITTLEFS=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=3072
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_WEBSERVER=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESP32_WIFI_STATION_SOFTAP=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI_STATION_SOFTAP=y
|
||||
CONFIG_EXAMPLES_DHCPD=y
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
|
|
|
|||
|
|
@ -70,15 +70,15 @@
|
|||
# include "esp32_board_spiflash.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
# include "esp32_ble.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
# include "esp32_board_wlan.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
# include "esp32_wifi_adapter.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -340,7 +340,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
ret = esp32_wifi_bt_coexist_init();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -349,7 +349,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
ret = esp32_ble_initialize();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -357,7 +357,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
ret = board_wlan_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_EXAMPLE_POWER_SAVE_MIN_MODEM=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
|
|
|
|||
|
|
@ -63,11 +63,11 @@
|
|||
# include "esp32_board_spiflash.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
# include "esp32_ble.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
# include "esp32_board_wlan.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
ret = esp32_ble_initialize();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -174,7 +174,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
ret = board_wlan_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ CONFIG_ESP32_I2S=y
|
|||
CONFIG_ESP32_SPIFLASH=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_EXAMPLES_I2SCHAR=y
|
||||
CONFIG_EXAMPLES_I2SCHAR_TX=y
|
||||
CONFIG_EXAMPLES_I2SCHAR_TXBUFFERS=2
|
||||
|
|
|
|||
|
|
@ -51,10 +51,10 @@ CONFIG_ESP32_I2S0_MCLK=y
|
|||
CONFIG_ESP32_I2S0_WSPIN=25
|
||||
CONFIG_ESP32_I2S=y
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESP32_WIFI_DYNAMIC_RXBUF_NUM=64
|
||||
CONFIG_ESP32_WIFI_DYNAMIC_TXBUF_NUM=64
|
||||
CONFIG_ESP32_WIFI_STATIC_RXBUF_NUM=16
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI_DYNAMIC_RXBUF_NUM=64
|
||||
CONFIG_ESPRESSIF_WIFI_DYNAMIC_TXBUF_NUM=64
|
||||
CONFIG_ESPRESSIF_WIFI_STATIC_RXBUF_NUM=16
|
||||
CONFIG_EXAMPLES_I2SCHAR=y
|
||||
CONFIG_EXAMPLES_I2SCHAR_TX=y
|
||||
CONFIG_EXAMPLES_I2SCHAR_TXBUFFERS=2
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=3072
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
|
|
|
|||
|
|
@ -64,11 +64,11 @@
|
|||
# include "esp32_board_spiflash.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
# include "esp32_ble.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
# include "esp32_board_wlan.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
ret = esp32_ble_initialize();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -214,7 +214,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
ret = board_wlan_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -63,15 +63,15 @@
|
|||
# include "esp32_board_spiflash.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
# include "esp32_ble.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
# include "esp32_board_wlan.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
# include "esp32_wifi_adapter.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
ret = esp32_wifi_bt_coexist_init();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -237,7 +237,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
ret = esp32_ble_initialize();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -245,7 +245,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
ret = board_wlan_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_EXAMPLES_MQTTC=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FS_FAT=y
|
||||
|
|
|
|||
|
|
@ -67,11 +67,11 @@
|
|||
# include "esp32_board_spiflash.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
# include "esp32_ble.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
# include "esp32_board_wlan.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -217,7 +217,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
ret = esp32_ble_initialize();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -225,7 +225,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
ret = board_wlan_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_EXAMPLE_POWER_SAVE_MIN_MODEM=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ CONFIG_ESP32_SPIFLASH=y
|
|||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESP32_WIFI=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
|
|
|
|||
|
|
@ -63,11 +63,11 @@
|
|||
# include "esp32_board_spiflash.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
# include "esp32_ble.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
# include "esp32_board_wlan.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -205,7 +205,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
ret = esp32_ble_initialize();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -213,7 +213,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
ret = board_wlan_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -71,11 +71,11 @@
|
|||
# include "esp32_board_spiflash.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
# include "esp32_ble.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
# include "esp32_board_wlan.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -210,7 +210,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif /* CONFIG_LPWAN_SX127X */
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
ret = esp32_ble_initialize();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -218,7 +218,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
ret = board_wlan_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,15 +75,15 @@
|
|||
# include "esp32_board_spiflash.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
# include "esp32_ble.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIRELESS
|
||||
#ifdef CONFIG_ESPRESSIF_WIRELESS
|
||||
# include "esp32_board_wlan.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
# include "esp32_wifi_adapter.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -274,7 +274,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
ret = esp32_wifi_bt_coexist_init();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -283,7 +283,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
ret = esp32_ble_initialize();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -291,7 +291,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIRELESS
|
||||
#ifdef CONFIG_ESPRESSIF_WIRELESS
|
||||
ret = board_wlan_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -71,11 +71,11 @@
|
|||
# include "esp32_board_spiflash.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
# include "esp32_ble.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
# include "esp32_board_wlan.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -210,7 +210,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif /* CONFIG_LPWAN_SX127X */
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
ret = esp32_ble_initialize();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -218,7 +218,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
ret = board_wlan_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -71,15 +71,15 @@
|
|||
# include "esp32_board_spiflash.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
# include "esp32_ble.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
# include "esp32_board_wlan.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
# include "esp32_wifi_adapter.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -277,7 +277,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI_BT_COEXIST
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
|
||||
ret = esp32_wifi_bt_coexist_init();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -286,7 +286,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_BLE
|
||||
#ifdef CONFIG_ESPRESSIF_BLE
|
||||
ret = esp32_ble_initialize();
|
||||
if (ret)
|
||||
{
|
||||
|
|
@ -294,7 +294,7 @@ int esp32_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_WIFI
|
||||
#ifdef CONFIG_ESPRESSIF_WIFI
|
||||
ret = board_wlan_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue