Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
7e7039b5
Commit
7e7039b5
authored
9 years ago
by
Josef Gajdusek
Committed by
Paul Sokolovsky
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
esp8266: Export station status() constants
parent
2378be4e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
esp8266/modesp.c
+17
-0
17 additions, 0 deletions
esp8266/modesp.c
esp8266/qstrdefsport.h
+6
-0
6 additions, 0 deletions
esp8266/qstrdefsport.h
with
23 additions
and
0 deletions
esp8266/modesp.c
+
17
−
0
View file @
7e7039b5
...
...
@@ -36,6 +36,8 @@
#include
"queue.h"
#include
"user_interface.h"
#define MODESP_INCLUDE_CONSTANTS (1)
// Singleton instance of scan callback, meaning that there can be only
// one concurrent AP scan.
STATIC
mp_obj_t
scan_cb_obj
;
...
...
@@ -116,6 +118,21 @@ STATIC const mp_map_elem_t esp_module_globals_table[] = {
{
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
},
#if MODESP_INCLUDE_CONSTANTS
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_STAT_IDLE
),
MP_OBJ_NEW_SMALL_INT
(
STATION_IDLE
)},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_STAT_CONNECTING
),
MP_OBJ_NEW_SMALL_INT
(
STATION_CONNECTING
)},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_STAT_WRONG_PASSWORD
),
MP_OBJ_NEW_SMALL_INT
(
STATION_WRONG_PASSWORD
)},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_STAT_NO_AP_FOUND
),
MP_OBJ_NEW_SMALL_INT
(
STATION_NO_AP_FOUND
)},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_STAT_CONNECT_FAIL
),
MP_OBJ_NEW_SMALL_INT
(
STATION_CONNECT_FAIL
)},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_STAT_GOT_IP
),
MP_OBJ_NEW_SMALL_INT
(
STATION_GOT_IP
)},
#endif
};
STATIC
MP_DEFINE_CONST_DICT
(
esp_module_globals
,
esp_module_globals_table
);
...
...
This diff is collapsed.
Click to expand it.
esp8266/qstrdefsport.h
+
6
−
0
View file @
7e7039b5
...
...
@@ -46,6 +46,12 @@ Q(connect)
Q
(
disconnect
)
Q
(
scan
)
Q
(
status
)
Q
(
STAT_IDLE
)
Q
(
STAT_CONNECTING
)
Q
(
STAT_WRONG_PASSWORD
)
Q
(
STAT_NO_AP_FOUND
)
Q
(
STAT_CONNECT_FAIL
)
Q
(
STAT_GOT_IP
)
// Pin class
Q
(
Pin
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment