extmod/network_cyw43: Add "security" config option to get/set auth mode.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
f4e69ab103
commit
d660a0c3d1
@ -365,6 +365,11 @@ STATIC mp_obj_t network_cyw43_config(size_t n_args, const mp_obj_t *args, mp_map
|
||||
return mp_obj_new_str((const char *)buf, len);
|
||||
}
|
||||
}
|
||||
#if MICROPY_PY_NETWORK_CYW43_USE_LIB_DRIVER
|
||||
case MP_QSTR_security: {
|
||||
return MP_OBJ_NEW_SMALL_INT(cyw43_wifi_ap_get_auth(self->cyw));
|
||||
}
|
||||
#endif
|
||||
case MP_QSTR_mac: {
|
||||
uint8_t buf[6];
|
||||
cyw43_wifi_get_mac(self->cyw, self->itf, buf);
|
||||
@ -421,6 +426,10 @@ STATIC mp_obj_t network_cyw43_config(size_t n_args, const mp_obj_t *args, mp_map
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MP_QSTR_security: {
|
||||
cyw43_wifi_ap_set_auth(self->cyw, mp_obj_get_int(e->value));
|
||||
break;
|
||||
}
|
||||
case MP_QSTR_key:
|
||||
case MP_QSTR_password: {
|
||||
size_t len;
|
||||
|
Loading…
Reference in New Issue
Block a user