kopia lustrzana https://github.com/micropython/micropython
esp8266/modnetwork: Add support for WLAN.config(protocol=XX) option.
Following esp32. This is preferred to using the phy_mode() function.pull/9058/head
rodzic
0507f239e8
commit
e6e60f4330
|
@ -406,6 +406,10 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs
|
|||
}
|
||||
break;
|
||||
}
|
||||
case MP_QSTR_protocol: {
|
||||
wifi_set_phy_mode(mp_obj_get_int(kwargs->table[i].value));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
goto unknown;
|
||||
}
|
||||
|
@ -473,6 +477,10 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs
|
|||
}
|
||||
break;
|
||||
}
|
||||
case MP_QSTR_protocol: {
|
||||
val = mp_obj_new_int(wifi_get_phy_mode());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
goto unknown;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue