8000 extmod/network_ninaw10: Rename WLAN connect argument from essid to ssid. · micropython/micropython@efa73ca · GitHub
[go: up one dir, main page]

Skip to content

Commit efa73ca

Browse files
iabdalkaderdpgeorge
authored andcommitted
extmod/network_ninaw10: Rename WLAN connect argument from essid to ssid.
Addresses issue #8083.
1 parent c502cf7 commit efa73ca

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

extmod/network_ninaw10.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ STATIC mp_obj_t network_ninaw10_scan(mp_obj_t self_in) {
196196
STATIC MP_DEFINE_CONST_FUN_OBJ_1(network_ninaw10_scan_obj, network_ninaw10_scan);
197197

198198
STATIC mp_obj_t network_ninaw10_connect(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
199-
enum { ARG_essid, ARG_key, ARG_security, ARG_channel };
199+
enum { ARG_ssid, ARG_key, ARG_security, ARG_channel };
200200
static const mp_arg_t allowed_args[] = {
201-
{ MP_QSTR_essid, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} },
201+
{ MP_QSTR_ssid, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} },
202202
{ MP_QSTR_key, MP_ARG_OBJ, {.u_obj = mp_const_none} },
203203
{ MP_QSTR_security, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = NINA_SEC_WPA_PSK} },
204204
{ MP_QSTR_channel, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1} },
@@ -210,7 +210,7 @@ STATIC mp_obj_t network_ninaw10_connect(mp_uint_t n_args, const mp_obj_t *pos_ar
210210
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
211211

212212
// get ssid
213-
const char *ssid = mp_obj_str_get_str(args[ARG_essid].u_obj);
213+
const char *ssid = mp_obj_str_get_str(args[ARG_ssid].u_obj);
214214

215215
if (strlen(ssid) == 0) {
216216
mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("SSID can't be empty!"));
@@ -304,7 +304,7 @@ STATIC mp_obj_t network_ninaw10_config(size_t n_args, const mp_obj_t *args, mp_m
304304
}
305305

306306
switch (mp_obj_str_get_qstr(args[1])) {
307-
case MP_QSTR_essid: {
307+
case MP_QSTR_ssid: {
308308
nina_netinfo_t netinfo;
309309
nina_netinfo(&netinfo);
310310
return mp_obj_new_str(netinfo.ssid, strlen(netinfo.ssid));

0 commit comments

Comments
 (0)
0