-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/support_ext_conn' into 'master'
Feature/support ext conn Closes IDF-7865 See merge request espressif/esp-idf!29884
- Loading branch information
Showing
33 changed files
with
1,345 additions
and
418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,36 @@ | ||
|
||
menu "Wireless Coexistence" | ||
config ESP_COEX_SW_COEXIST_ENABLE | ||
bool "Software controls WiFi/Bluetooth coexistence" | ||
depends on (ESP_WIFI_ENABLED && BT_ENABLED) || \ | ||
(ESP_WIFI_ENABLED && IEEE802154_ENABLED) || \ | ||
(IEEE802154_ENABLED && BT_ENABLED) | ||
default y | ||
select ESP_WIFI_STA_DISCONNECTED_PM_ENABLE if (ESP_WIFI_ENABLED) | ||
help | ||
If enabled, WiFi & Bluetooth coexistence is controlled by software rather than hardware. | ||
Recommended for heavy traffic scenarios. Both coexistence configuration options are | ||
automatically managed, no user intervention is required. | ||
If only Bluetooth is used, it is recommended to disable this option to reduce binary file | ||
size. | ||
|
||
config ESP_COEX_EXTERNAL_COEXIST_ENABLE | ||
bool "External Coexistence" | ||
default n | ||
depends on (!(BT_ENABLED||NIMBLE_ENABLED)&&(!IDF_TARGET_ESP32)) | ||
help | ||
If enabled, HW External coexistence arbitration is managed by GPIO pins. | ||
It can support three types of wired combinations so far which are 1-wired/2-wired/3-wired. | ||
User can select GPIO pins in application code with configure interfaces. | ||
config ESP_COEX_ENABLED | ||
bool | ||
default y if (!SOC_WIRELESS_HOST_SUPPORTED) | ||
|
||
This function depends on BT-off | ||
because currently we do not support external coex and internal coex simultaneously. | ||
if(ESP_COEX_ENABLED) | ||
config ESP_COEX_SW_COEXIST_ENABLE | ||
bool "Software controls WiFi/Bluetooth coexistence" | ||
depends on (ESP_WIFI_ENABLED && BT_ENABLED) || \ | ||
(ESP_WIFI_ENABLED && IEEE802154_ENABLED) || \ | ||
(IEEE802154_ENABLED && BT_ENABLED) | ||
default y | ||
select ESP_WIFI_STA_DISCONNECTED_PM_ENABLE if (ESP_WIFI_ENABLED) | ||
help | ||
If enabled, WiFi & Bluetooth coexistence is controlled by software rather than hardware. | ||
Recommended for heavy traffic scenarios. Both coexistence configuration options are | ||
automatically managed, no user intervention is required. | ||
If only Bluetooth is used, it is recommended to disable this option to reduce binary file | ||
size. | ||
|
||
config ESP_COEX_EXTERNAL_COEXIST_ENABLE | ||
bool "External Coexistence" | ||
default n | ||
depends on (!(BT_ENABLED||NIMBLE_ENABLED)&&(!IDF_TARGET_ESP32)) | ||
help | ||
If enabled, HW External coexistence arbitration is managed by GPIO pins. | ||
It can support three types of wired combinations so far which are 1-wired/2-wired/3-wired. | ||
User can select GPIO pins in application code with configure interfaces. | ||
|
||
This function depends on BT-off | ||
because currently we do not support external coex and internal coex simultaneously. | ||
|
||
endif | ||
endmenu # Wireless Coexistence |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2016-2024 Espressif Systems (Shanghai) CO LTD | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/** | ||
* @file lib_printf.c | ||
* | ||
* This file contains library-specific printf functions | ||
* used by WiFi libraries in the `lib` directory. | ||
* These function are used to catch any output which gets printed | ||
* by libraries, and redirect it to ESP_LOG macros. | ||
* | ||
* Eventually WiFi libraries will use ESP_LOG functions internally | ||
* and these definitions will be removed. | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include "esp_log.h" | ||
#include "esp_attr.h" | ||
|
||
#define VPRINTF_STACK_BUFFER_SIZE 80 | ||
|
||
static int lib_printf(const char* tag, const char* format, va_list arg) | ||
{ | ||
char temp[VPRINTF_STACK_BUFFER_SIZE]; | ||
int len = vsnprintf(temp, sizeof(temp) - 1, format, arg); | ||
temp[sizeof(temp) - 1] = 0; | ||
int i; | ||
for (i = len - 1; i >= 0; --i) { | ||
if (temp[i] != '\n' && temp[i] != '\r' && temp[i] != ' ') { | ||
break; | ||
} | ||
temp[i] = 0; | ||
} | ||
if (i > 0) { | ||
ESP_LOGI(tag, "%s", temp); | ||
} | ||
va_end(arg); | ||
return len; | ||
} | ||
|
||
int coexist_printf(const char* format, ...) | ||
{ | ||
va_list arg; | ||
va_start(arg, format); | ||
int res = lib_printf("coexist", format, arg); | ||
va_end(arg); | ||
return res; | ||
} |
Oops, something went wrong.