feat(epicardium): Add core 1 lifecycle
This commit introduces a lifecycle for core 1. Based on the new loading
system, a few APIs are made available to control the payload running on
core 1. These are:
1. From core 1 (Pycardium, L0dable):
- `epic_exec(name)` API Call: Request loading of a new payload by
name. If the file does not exist, the call will return with an
error code. Otherwise, control will go to the new payload.
- `epic_exit(retcode)` API Call: Return from payload
unconditionally. This call should be called whenever a payload is
done or when it has hit an unrecoverable error. On `epic_exit`,
Epicardium will reset the core back into the menu.
2. From inside Epicardium:
- `epic_exec(name)`: This is **not** the same as the API call, as it
needs a different implementation underneath. It will load a new
payload and wait until this load actually completed (synchroneous).
- `return_to_menu()`: Return core 1 to the menu script no matter
what it is currently doing. This call is asynchroneous and will
return immediately after scheduling the lifecycle task. This task
will then take care of actually performing the load.
Signed-off-by:
Rahix <rahix@rahix.de>
Showing
- epicardium/api/caller.c 41 additions, 0 deletionsepicardium/api/caller.c
- epicardium/epicardium.h 55 additions, 4 deletionsepicardium/epicardium.h
- epicardium/main.c 13 additions, 28 deletionsepicardium/main.c
- epicardium/modules/lifecycle.c 315 additions, 0 deletionsepicardium/modules/lifecycle.c
- epicardium/modules/meson.build 1 addition, 0 deletionsepicardium/modules/meson.build
- epicardium/modules/modules.h 4 additions, 0 deletionsepicardium/modules/modules.h
Loading
Please register or sign in to comment