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
95cc1ff5
Commit
95cc1ff5
authored
9 years ago
by
Daniel Campora
Browse files
Options
Downloads
Patches
Plain Diff
cc3200: Re-name pyb.hard_reset() to pyb.reset().
parent
330e21c9
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
cc3200/mods/modpyb.c
+10
-7
10 additions, 7 deletions
cc3200/mods/modpyb.c
cc3200/qstrdefsport.h
+1
-1
1 addition, 1 deletion
cc3200/qstrdefsport.h
with
11 additions
and
8 deletions
cc3200/mods/modpyb.c
+
10
−
7
View file @
95cc1ff5
...
...
@@ -82,17 +82,17 @@ extern OsiTaskHandle xSimpleLinkSpawnTaskHndl;
///
/// The `pyb` module contains specific functions related to the pyboard.
/// \function
hard_
reset()
/// Resets the pyboard in a manner similar to pushing the external
RESET
/// button.
STATIC
mp_obj_t
pyb_
hard_
reset
(
void
)
{
/// \function reset()
/// Resets the pyboard in a manner similar to pushing the external
///
reset
button.
STATIC
mp_obj_t
pyb_reset
(
void
)
{
// disable wlan
wlan_stop
(
SL_STOP_TIMEOUT_LONG
);
// reset the cpu and it's peripherals
MAP_PRCMMCUReset
(
true
);
return
mp_const_none
;
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_0
(
pyb_
hard_
reset_obj
,
pyb_
hard_
reset
);
STATIC
MP_DEFINE_CONST_FUN_OBJ_0
(
pyb_reset_obj
,
pyb_reset
);
#ifdef DEBUG
/// \function info([dump_alloc_table])
...
...
@@ -126,7 +126,10 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(pyb_info_obj, 0, 1, pyb_info);
/// \function freq()
/// Returns the CPU frequency: (F_CPU).
STATIC
mp_obj_t
pyb_freq
(
void
)
{
return
mp_obj_new_int
(
HAL_FCPU_HZ
);
mp_obj_t
tuple
[
1
]
=
{
mp_obj_new_int
(
HAL_FCPU_HZ
),
};
return
mp_obj_new_tuple
(
1
,
tuple
);
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_0
(
pyb_freq_obj
,
pyb_freq
);
...
...
@@ -250,7 +253,7 @@ MP_DECLARE_CONST_FUN_OBJ(pyb_main_obj); // defined in main.c
STATIC
const
mp_map_elem_t
pyb_module_globals_table
[]
=
{
{
MP_OBJ_NEW_QSTR
(
MP_QSTR___name__
),
MP_OBJ_NEW_QSTR
(
MP_QSTR_pyb
)
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_
hard_
reset
),
(
mp_obj_t
)
&
pyb_
hard_
reset_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_reset
),
(
mp_obj_t
)
&
pyb_reset_obj
},
#ifdef DEBUG
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_info
),
(
mp_obj_t
)
&
pyb_info_obj
},
#endif
...
...
This diff is collapsed.
Click to expand it.
cc3200/qstrdefsport.h
+
1
−
1
View file @
95cc1ff5
...
...
@@ -30,7 +30,7 @@ Q(__name__)
Q
(
help
)
Q
(
pyb
)
Q
(
info
)
Q
(
hard_
reset
)
Q
(
reset
)
Q
(
main
)
Q
(
sync
)
Q
(
gc
)
...
...
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