Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
6dba016a
Commit
6dba016a
authored
Apr 14, 2014
by
Damien George
Browse files
stmhal: Add pyb.wfi() function (calls __WFI).
parent
86a03044
Changes
2
Hide whitespace changes
Inline
Side-by-side
stmhal/modpyb.c
View file @
6dba016a
...
...
@@ -132,6 +132,13 @@ STATIC mp_obj_t pyb_udelay(mp_obj_t usec) {
STATIC
MP_DEFINE_CONST_FUN_OBJ_1
(
pyb_udelay_obj
,
pyb_udelay
);
STATIC
mp_obj_t
pyb_wfi
(
void
)
{
__WFI
();
return
mp_const_none
;
}
MP_DEFINE_CONST_FUN_OBJ_0
(
pyb_wfi_obj
,
pyb_wfi
);
#if 0
STATIC void SYSCLKConfig_STOP(void) {
/* After wake-up from STOP reconfigure the system clock */
...
...
@@ -221,6 +228,7 @@ STATIC const mp_map_elem_t pyb_module_globals_table[] = {
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_gc
),
(
mp_obj_t
)
&
pyb_gc_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_repl_info
),
(
mp_obj_t
)
&
pyb_set_repl_info_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_wfi
),
(
mp_obj_t
)
&
pyb_wfi_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_stop
),
(
mp_obj_t
)
&
pyb_stop_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_standby
),
(
mp_obj_t
)
&
pyb_standby_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_source_dir
),
(
mp_obj_t
)
&
pyb_source_dir_obj
},
...
...
stmhal/qstrdefsport.h
View file @
6dba016a
...
...
@@ -6,6 +6,7 @@ Q(info)
Q
(
sd_test
)
Q
(
present
)
Q
(
power
)
Q
(
wfi
)
Q
(
stop
)
Q
(
standby
)
Q
(
source_dir
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment