10000 ports/esp32/modnetwork.c: Use `isconnected` for link status · nickzoic/micropython-esp32@5bd547f · GitHub
[go: up one dir, main page]

Skip to content

Commit 5bd547f

Browse files
committed
ports/esp32/modnetwork.c: Use isconnected for link status
1 parent bb24958 commit 5bd547f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ports/esp32/modnetwork.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,11 @@ STATIC mp_obj_t esp_status(mp_obj_t self_in) {
440440

441441
STATIC MP_DEFINE_CONST_FUN_OBJ_1(esp_status_obj, esp_status);
442442

443-
STATIC mp_obj_t lan_status(mp_obj_t self_in) {
443+
STATIC mp_obj_t lan_isconnected(mp_obj_t self_in) {
444444
lan_if_obj_t *self = MP_OBJ_TO_PTR(self_in);
445445
return self->link_func() ? mp_const_true : mp_const_false;
446446
}
447-
STATIC MP_DEFINE_CONST_FUN_OBJ_1(lan_status_obj, lan_status);
447+
STATIC MP_DEFINE_CONST_FUN_OBJ_1(lan_isconnected_obj, lan_isconnected);
448448

449449
STATIC mp_obj_t esp_scan(mp_obj_t self_in) {
450450
// check that STA mode is active
@@ -696,7 +696,8 @@ const mp_obj_type_t wlan_if_type = {
696696

697697
STATIC const mp_map_elem_t lan_if_locals_dict_table[] = {
698698
{ MP_OBJ_NEW_QSTR(MP_QSTR_active), (mp_obj_t)&lan_active_obj },
699-
{ MP_OBJ_NEW_QSTR(MP_QSTR_status), (mp_obj_t)&lan_status_obj },
699+
{ MP_OBJ_NEW_QSTR(MP_QSTR_isconnected), (mp_obj_t)&lan_isconnected_obj },
700+
{ MP_OBJ_NEW_QSTR(MP_QSTR_status), (mp_obj_t)&esp_status_obj },
700701
{ MP_OBJ_NEW_QSTR(MP_QSTR_ifconfig), (mp_obj_t)&esp_ifconfig_obj },
701702
};
702703

0 commit comments

Comments
 (0)
0