Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
François Revol
firmware
Commits
154cc573
Verified
Commit
154cc573
authored
Aug 20, 2019
by
Rahix
Browse files
feat(api): Add API-call for soft-reset
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
24be7ca2
Changes
2
Show whitespace changes
Inline
Side-by-side
epicardium/epicardium.h
View file @
154cc573
...
...
@@ -31,6 +31,7 @@ typedef _Bool bool;
/* clang-format off */
#define API_SYSTEM_EXIT 0x1
#define API_SYSTEM_EXEC 0x2
#define API_SYSTEM_RESET 0x3
#define API_INTERRUPT_ENABLE 0xA
#define API_INTERRUPT_DISABLE 0xB
...
...
@@ -196,6 +197,11 @@ int epic_exec(char *name);
*/
API
(
API_SYSTEM_EXEC
,
int
__epic_exec
(
char
*
name
));
/**
* Reset/Restart card10
*/
API
(
API_SYSTEM_RESET
,
void
epic_system_reset
(
void
));
/**
* UART/Serial Interface
* =====================
...
...
epicardium/modules/lifecycle.c
View file @
154cc573
...
...
@@ -275,6 +275,14 @@ static void load_menu(bool reset)
/* Helpers }}} */
/* API {{{ */
/*
* Restart the firmware
*/
void
epic_system_reset
(
void
)
{
card10_reset
();
}
/*
* This is NOT the epic_exec() called from Pycardium, but an implementation of
* the same call for use in Epicardium. This function is synchroneous and will
...
...
Write
Preview
Supports
Markdown
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