Skip to content

Commit f3ad704

Browse files
committed
Don't set error LED on bad chip ID failure
1 parent b236ffe commit f3ad704

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/WiFi.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,11 @@ int WiFiClass::init()
288288
ret = m2m_wifi_init(&param);
289289
if (M2M_SUCCESS != ret && M2M_ERR_FW_VER_MISMATCH != ret) {
290290
#ifdef CONF_PERIPH
291-
// Error led ON (rev A then rev B).
292-
m2m_periph_gpio_set_val(M2M_PERIPH_GPIO18, 0);
293-
m2m_periph_gpio_set_dir(M2M_PERIPH_GPIO6, 1);
291+
if (ret != M2M_ERR_INVALID) {
292+
// Error led ON (rev A then rev B).
293+
m2m_periph_gpio_set_val(M2M_PERIPH_GPIO18, 0);
294+
m2m_periph_gpio_set_dir(M2M_PERIPH_GPIO6, 1);
295+
}
294296
#endif
295297
return ret;
296298
}

0 commit comments

Comments
 (0)