Skip to content
Snippets Groups Projects
Verified Commit 154cc573 authored by rahix's avatar rahix
Browse files

feat(api): Add API-call for soft-reset


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 24be7ca2
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,7 @@ typedef _Bool bool; ...@@ -31,6 +31,7 @@ typedef _Bool bool;
/* clang-format off */ /* clang-format off */
#define API_SYSTEM_EXIT 0x1 #define API_SYSTEM_EXIT 0x1
#define API_SYSTEM_EXEC 0x2 #define API_SYSTEM_EXEC 0x2
#define API_SYSTEM_RESET 0x3
#define API_INTERRUPT_ENABLE 0xA #define API_INTERRUPT_ENABLE 0xA
#define API_INTERRUPT_DISABLE 0xB #define API_INTERRUPT_DISABLE 0xB
...@@ -196,6 +197,11 @@ int epic_exec(char *name); ...@@ -196,6 +197,11 @@ int epic_exec(char *name);
*/ */
API(API_SYSTEM_EXEC, 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 * UART/Serial Interface
* ===================== * =====================
......
...@@ -275,6 +275,14 @@ static void load_menu(bool reset) ...@@ -275,6 +275,14 @@ static void load_menu(bool reset)
/* Helpers }}} */ /* Helpers }}} */
/* API {{{ */ /* API {{{ */
/*
* Restart the firmware
*/
void epic_system_reset(void)
{
card10_reset();
}
/* /*
* This is NOT the epic_exec() called from Pycardium, but an implementation of * 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 * the same call for use in Epicardium. This function is synchroneous and will
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment