File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -253,11 +253,13 @@ static bool wifiHostedInit() {
253
253
conf.pin_d2 .pin = CONFIG_ESP_SDIO_PIN_D2;
254
254
conf.pin_d3 .pin = CONFIG_ESP_SDIO_PIN_D3;
255
255
// conf.pin_rst.pin = CONFIG_ESP_SDIO_GPIO_RESET_SLAVE;
256
+ // esp_hosted_sdio_set_config() will fail on second attempt but here temporarily to not cause exception on reinit
256
257
if (esp_hosted_sdio_set_config (&conf) != ESP_OK || esp_hosted_init () != ESP_OK) {
257
258
log_e (" esp_hosted_init failed!" );
258
259
hosted_initialized = false ;
259
260
return false ;
260
261
}
262
+ log_v (" ESP-HOSTED initialized!" );
261
263
}
262
264
// Attach pins to PeriMan here
263
265
// Slave chip model is CONFIG_IDF_SLAVE_TARGET
@@ -346,8 +348,9 @@ static bool wifiLowLevelDeinit() {
346
348
arduino_event.event_id = ARDUINO_EVENT_WIFI_OFF;
347
349
Network.postEvent (&arduino_event);
348
350
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
349
- if (! hosted_initialized && esp_hosted_deinit () == ESP_OK) {
351
+ if (hosted_initialized && esp_hosted_deinit () == ESP_OK) {
350
352
hosted_initialized = false ;
353
+ log_v (" ESP-HOSTED uninitialized!" );
351
354
// detach SDIO pins from PeriMan
352
355
}
353
356
#endif
You can’t perform that action at this time.
0 commit comments