mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-06 21:54:29 -04:00
fw: Add syscalls
Adds: - SYSCALL_RESET - SYSCALL_SET_LED Co-authored-by: Michael Cardell Widerkrantz <mc@tillitis.se>
This commit is contained in:
parent
969df46315
commit
d82c3a706e
10 changed files with 283 additions and 9 deletions
|
@ -9,6 +9,7 @@
|
|||
#include "lib.h"
|
||||
#include "proto.h"
|
||||
#include "state.h"
|
||||
#include "syscall_enable.h"
|
||||
#include "types.h"
|
||||
|
||||
// clang-format off
|
||||
|
@ -343,13 +344,10 @@ static void run(const struct context *ctx)
|
|||
#endif
|
||||
// clang-format on
|
||||
|
||||
// Flip over to application mode
|
||||
*app_mode_ctrl = 1;
|
||||
|
||||
// XXX Firmware stack now no longer available
|
||||
// Don't use any function calls!
|
||||
syscall_enable();
|
||||
|
||||
// Jump to app - doesn't return
|
||||
// Hardware is responsible for switching to app mode
|
||||
// clang-format off
|
||||
#ifndef S_SPLINT_S
|
||||
asm volatile(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue