Commit 5239a8a8 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

esp8266/modnetwork: Add symbolic names for network interfaces: STA_IF & AP_IF.

These are expected to be passed to network.WLAN() to instantiate network
interface objects.
parent a49c1606
......@@ -323,6 +323,11 @@ STATIC const mp_map_elem_t mp_module_network_globals_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_phy_mode), (mp_obj_t)&esp_phy_mode_obj },
#if MODNETWORK_INCLUDE_CONSTANTS
{ MP_OBJ_NEW_QSTR(MP_QSTR_STA_IF),
MP_OBJ_NEW_SMALL_INT(STATION_IF)},
{ MP_OBJ_NEW_QSTR(MP_QSTR_AP_IF),
MP_OBJ_NEW_SMALL_INT(SOFTAP_IF)},
{ MP_OBJ_NEW_QSTR(MP_QSTR_STAT_IDLE),
MP_OBJ_NEW_SMALL_INT(STATION_IDLE)},
{ MP_OBJ_NEW_QSTR(MP_QSTR_STAT_CONNECTING),
......
......@@ -106,6 +106,8 @@ Q(isconnected)
Q(mac)
Q(config)
Q(ifconfig)
Q(STA_IF)
Q(AP_IF)
Q(STAT_IDLE)
Q(STAT_CONNECTING)
Q(STAT_WRONG_PASSWORD)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment