mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
Decouple WiFi and BT with coexist to reduce bin size
1. Do not link WiFi code when only BT or BLE is used and WiFi is not used. 2. Do not link coexist code when CONFIG_SW_COEXIST_ENABLE is disabled.
This commit is contained in:
@@ -27,6 +27,9 @@ mesh_event_cb_t g_mesh_event_cb = NULL;
|
||||
static esp_pm_lock_handle_t s_wifi_modem_sleep_lock;
|
||||
#endif
|
||||
|
||||
/* Callback function to update WiFi MAC time */
|
||||
wifi_mac_time_update_cb_t s_wifi_mac_time_update_cb = NULL;
|
||||
|
||||
static void __attribute__((constructor)) s_set_default_wifi_log_level()
|
||||
{
|
||||
/* WiFi libraries aren't compiled to know CONFIG_LOG_DEFAULT_LEVEL,
|
||||
@@ -97,7 +100,10 @@ esp_err_t esp_wifi_init(const wifi_init_config_t *config)
|
||||
#endif
|
||||
esp_event_set_default_wifi_handlers();
|
||||
esp_err_t result = esp_wifi_init_internal(config);
|
||||
esp_wifi_set_debug_log();
|
||||
if (result == ESP_OK) {
|
||||
esp_wifi_set_debug_log();
|
||||
s_wifi_mac_time_update_cb = esp_wifi_internal_update_mac_time;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user