esp8266/modnetwork: Add support for WLAN.config(protocol=XX) option.
Following esp32. This is preferred to using the phy_mode() function.
This commit is contained in:
parent
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user