mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
Build: Handle WiFi & BT enabled/disabled combos gracefully as possible
If using WIFI_INIT_CONFIG_DEFAULT, error message will point out lack of WiFi. Otherwise linker errors on WiFi symbols should help give a clue as to what is broken. Piggy-backs on changes in !420, ref github #230 #237
This commit is contained in:
@@ -62,6 +62,7 @@
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/queue.h"
|
||||
#include "rom/queue.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_wifi_types.h"
|
||||
#include "esp_event.h"
|
||||
@@ -97,11 +98,14 @@ typedef struct {
|
||||
uint32_t rx_buf_num; /**< WiFi RX buffer number */
|
||||
} wifi_init_config_t;
|
||||
|
||||
|
||||
#ifdef CONFIG_WIFI_ENABLED
|
||||
#define WIFI_INIT_CONFIG_DEFAULT() { \
|
||||
.event_handler = &esp_event_send, \
|
||||
.rx_buf_num = CONFIG_ESP32_WIFI_RX_BUFFER_NUM, \
|
||||
};
|
||||
#else
|
||||
#define WIFI_INIT_CONFIG_DEFAULT #error Wifi is disabled in config, WIFI_INIT_CONFIG_DEFAULT will not work
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Init WiFi
|
||||
|
Reference in New Issue
Block a user