Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
d6f648d0
Commit
d6f648d0
authored
Feb 05, 2015
by
Paul Sokolovsky
Browse files
esp8266: modesp: Add status() function for connection status.
parent
b276cf19
Changes
2
Hide whitespace changes
Inline
Side-by-side
esp8266/modesp.c
View file @
d6f648d0
...
...
@@ -105,12 +105,18 @@ STATIC mp_obj_t esp_disconnect() {
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_0
(
esp_disconnect_obj
,
esp_disconnect
);
STATIC
mp_obj_t
esp_status
()
{
return
MP_OBJ_NEW_SMALL_INT
(
wifi_station_get_connect_status
());
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_0
(
esp_status_obj
,
esp_status
);
STATIC
const
mp_map_elem_t
esp_module_globals_table
[]
=
{
{
MP_OBJ_NEW_QSTR
(
MP_QSTR___name__
),
MP_OBJ_NEW_QSTR
(
MP_QSTR_esp
)
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_connect
),
(
mp_obj_t
)
&
esp_connect_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_disconnect
),
(
mp_obj_t
)
&
esp_disconnect_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_scan
),
(
mp_obj_t
)
&
esp_scan_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_status
),
(
mp_obj_t
)
&
esp_status_obj
},
};
STATIC
MP_DEFINE_CONST_DICT
(
esp_module_globals
,
esp_module_globals_table
);
...
...
esp8266/qstrdefsport.h
View file @
d6f648d0
...
...
@@ -45,3 +45,4 @@ Q(esp)
Q
(
connect
)
Q
(
disconnect
)
Q
(
scan
)
Q
(
status
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment