PoC: Remove IRQ30 from fw/irqpoc_c_example

Removing IRQ30 since it us no longer exist
This commit is contained in:
Mikael Ågren 2024-12-17 14:38:01 +01:00
parent 91625c05bb
commit a9484d9cf4
No known key found for this signature in database
GPG key ID: E02DA3D397792C46
2 changed files with 27 additions and 73 deletions

View file

@ -10,38 +10,12 @@
// Proof-of-concept firmware for handling syscalls.
// This is NOT a best-practice example of secure syscall implementation.
#define SYSCALL_HI (1 << 31)
#define SYSCALL_LO 0
#define SYSCALL_SET_LED 10
#define SYSCALL_HI_SET_LED (SYSCALL_HI | 10)
#define SYSCALL_LO_SET_LED (SYSCALL_LO | 10)
static void delay(int32_t count) {
volatile int32_t c = count;
while (c > 0) {
c--;
}
}
int32_t syscall_lo_handler(uint32_t syscall_nr, uint32_t arg1) {
int32_t syscall_handler(uint32_t syscall_nr, uint32_t arg1) {
switch (syscall_nr) {
case SYSCALL_LO_SET_LED:
case SYSCALL_SET_LED:
set_led(arg1);
//delay(1000000);
return 0;
default:
assert(1 == 2);
}
assert(1 == 2);
return -1; // This should never run
}
int32_t syscall_hi_handler(uint32_t syscall_nr, uint32_t arg1) {
switch (syscall_nr) {
case SYSCALL_HI_SET_LED:
set_led(arg1);
//delay(500000);
return 0;
default:
assert(1 == 2);