espressif / esp-homekit-sdk

544 stars 98 forks source link

line 261 of /common/app_wifi/app_wifi.c should add "#ifdef ESP_NETIF_SUPPORTED" #34

Closed dongbh closed 3 years ago

dongbh commented 3 years ago

I can not compile when updated to the recent version using ESP8266, in examples/common/app_wifi/app_wifi.c: 260 / Register our event handler for Wi-Fi, IP and Provisioning related events / 261 ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, wifi_netif)); 262 ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler, NULL)); 263 ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, IP_EVENT_GOT_IP6, &event_handler, NULL));

I think line 261 should add

ifdef ESP_NETIF_SUPPORTED

261     ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, wifi_netif));

endif

dongbh commented 3 years ago

should change to:

ifdef ESP_NETIF_SUPPORTED

ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, wifi_netif));

else

ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL));

endif