Преглед изворни кода

esp32: esp_wifi.h: Replace a non-working #error statement with a working _Static_assert statement

Merges #440 https://github.com/espressif/esp-idf/pull/440
Edmund Huber пре 8 година
родитељ
комит
0aab67f0aa
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      components/esp32/include/esp_wifi.h

+ 1 - 1
components/esp32/include/esp_wifi.h

@@ -135,7 +135,7 @@ typedef struct {
     .magic = WIFI_INIT_CONFIG_MAGIC\
 };
 #else
-#define WIFI_INIT_CONFIG_DEFAULT #error Wifi is disabled in config, WIFI_INIT_CONFIG_DEFAULT will not work
+#define WIFI_INIT_CONFIG_DEFAULT() {0}; _Static_assert(0, "please enable wifi in menuconfig to use esp_wifi.h");
 #endif
 
 /**