Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
31ad1bb6
Commit
31ad1bb6
authored
Aug 07, 2016
by
Paul Sokolovsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
esp8266/modmachine: Implement dummy sleep() function.
parent
541e76fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
esp8266/modmachine.c
esp8266/modmachine.c
+8
-0
No files found.
esp8266/modmachine.c
View file @
31ad1bb6
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
*/
*/
#include <stdint.h>
#include <stdint.h>
#include <stdio.h>
#include "py/obj.h"
#include "py/obj.h"
#include "py/runtime.h"
#include "py/runtime.h"
...
@@ -88,6 +89,12 @@ STATIC mp_obj_t machine_idle(void) {
...
@@ -88,6 +89,12 @@ STATIC mp_obj_t machine_idle(void) {
}
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_0
(
machine_idle_obj
,
machine_idle
);
STATIC
MP_DEFINE_CONST_FUN_OBJ_0
(
machine_idle_obj
,
machine_idle
);
STATIC
mp_obj_t
machine_sleep
(
void
)
{
printf
(
"Warning: not yet implemented
\n
"
);
return
mp_const_none
;
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_0
(
machine_sleep_obj
,
machine_sleep
);
STATIC
mp_obj_t
machine_deepsleep
(
void
)
{
STATIC
mp_obj_t
machine_deepsleep
(
void
)
{
// default to sleep forever
// default to sleep forever
uint32_t
sleep_us
=
0
;
uint32_t
sleep_us
=
0
;
...
@@ -229,6 +236,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
...
@@ -229,6 +236,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
{
MP_ROM_QSTR
(
MP_QSTR_reset_cause
),
MP_ROM_PTR
(
&
machine_reset_cause_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_reset_cause
),
MP_ROM_PTR
(
&
machine_reset_cause_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_unique_id
),
MP_ROM_PTR
(
&
machine_unique_id_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_unique_id
),
MP_ROM_PTR
(
&
machine_unique_id_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_idle
),
MP_ROM_PTR
(
&
machine_idle_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_idle
),
MP_ROM_PTR
(
&
machine_idle_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_sleep
),
MP_ROM_PTR
(
&
machine_sleep_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_deepsleep
),
MP_ROM_PTR
(
&
machine_deepsleep_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_deepsleep
),
MP_ROM_PTR
(
&
machine_deepsleep_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_disable_irq
),
MP_ROM_PTR
(
&
machine_disable_irq_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_disable_irq
),
MP_ROM_PTR
(
&
machine_disable_irq_obj
)
},
...
...
Write
Preview
Markdown
is supported
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