Skip to content

Commit df2eb55

Browse files
committed
Merge branch 'bugfix/sdio_reset' into 'master'
esp_hosted_ng: Add support for runtime detection interface in SDIO See merge request app-frameworks/esp_hosted!434
2 parents df7deb5 + 363728e commit df2eb55

File tree

1 file changed

+5
-6
lines changed
  • esp_hosted_ng/esp/esp_driver/network_adapter/main

1 file changed

+5
-6
lines changed

esp_hosted_ng/esp/esp_driver/network_adapter/main/app_main.c

+5-6
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ int event_handler(uint8_t val)
613613
} else {
614614
ESP_EARLY_LOGI(TAG, "Failed to Stop Data Path");
615615
}
616+
esp_restart();
616617
break;
617618

618619
case ESP_POWER_SAVE_ON:
@@ -724,13 +725,11 @@ void app_main()
724725

725726
create_debugging_tasks();
726727

727-
while (!datapath) {
728-
usleep(100*1000);
729-
}
730-
731728
set_gpio_cd_pin();
732-
/*send capabilities to host*/
733-
send_bootup_event_to_host(capa);
729+
730+
/* send capabilities to host */
731+
if (datapath || xSemaphoreTake(init_sem, portMAX_DELAY))
732+
send_bootup_event_to_host(capa);
734733

735734
ESP_LOGI(TAG,"Initial set up done");
736735
}

0 commit comments

Comments
 (0)