Allow phy to be initialized only if WiFi/BLE is used/enabled

fixes: https://github.com/espressif/arduino-esp32/issues/72
This commit is contained in:
me-no-dev
2016-12-01 13:23:17 +02:00
parent 57c3650ea2
commit 8904f52c39
5 changed files with 53 additions and 1 deletions

View File

@ -52,6 +52,9 @@ extern "C" {
static bool _esp_wifi_initalized = false;
extern void initWiFi()
{
#if !CONFIG_ESP32_PHY_AUTO_INIT
arduino_phy_init();
#endif
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
tcpip_adapter_init();
esp_event_loop_init(&WiFiGenericClass::_eventCallback, NULL);