Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External 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
Show more breadcrumbs
fpletz
firmware
Commits
66cd10d4
Verified
Commit
66cd10d4
authored
5 years ago
by
rahix
Browse files
Options
Downloads
Patches
Plain Diff
docs: Document os.reset()
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
5fe5fe31
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
Documentation/pycardium/os.rst
+9
-0
9 additions, 0 deletions
Documentation/pycardium/os.rst
pycardium/modules/os.c
+9
-9
9 additions, 9 deletions
pycardium/modules/os.c
with
18 additions
and
9 deletions
Documentation/pycardium/os.rst
+
9
−
0
View file @
66cd10d4
...
...
@@ -43,3 +43,12 @@ Epicardium-Specific
:param str name: Path to new app/script/l0dable.
:return: This function never returns. It can, however raise an exception.
.. py:function:: os.reset()
Reboot card10.
.. warning::
Please only call this function if absolutely necessary. In most cases
you'll want to just :py:func:`os.exit` instead.
This diff is collapsed.
Click to expand it.
pycardium/modules/os.c
+
9
−
9
View file @
66cd10d4
...
...
@@ -19,15 +19,6 @@ static mp_obj_t mp_os_exit(size_t n_args, const mp_obj_t *args)
}
static
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN
(
exit_obj
,
0
,
1
,
mp_os_exit
);
static
mp_obj_t
mp_os_reset
(
void
)
{
epic_system_reset
();
/* unreachable */
return
mp_const_none
;
}
static
MP_DEFINE_CONST_FUN_OBJ_0
(
reset_obj
,
mp_os_reset
);
static
mp_obj_t
mp_os_exec
(
mp_obj_t
name_in
)
{
const
char
*
name_ptr
;
...
...
@@ -57,6 +48,15 @@ static mp_obj_t mp_os_exec(mp_obj_t name_in)
}
static
MP_DEFINE_CONST_FUN_OBJ_1
(
exec_obj
,
mp_os_exec
);
static
mp_obj_t
mp_os_reset
(
void
)
{
epic_system_reset
();
/* unreachable */
return
mp_const_none
;
}
static
MP_DEFINE_CONST_FUN_OBJ_0
(
reset_obj
,
mp_os_reset
);
static
mp_obj_t
mp_os_listdir
(
mp_obj_t
py_path
)
{
const
char
*
path
=
mp_obj_str_get_str
(
py_path
);
...
...
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