26 lines
503 B
C
26 lines
503 B
C
#pragma once
|
|
|
|
#include <stddef.h>
|
|
|
|
typedef void (*interrupt_callback_func_t)(uint64_t);
|
|
|
|
typedef struct interrupt {
|
|
struct interrupt *_l, *_r;
|
|
uint32_t _d;
|
|
|
|
uint64_t priority;
|
|
interrupt_callback_func_t func;
|
|
uint64_t param;
|
|
} interrupt_t;
|
|
|
|
void add_interrupt_task(uint64_t priority,
|
|
interrupt_callback_func_t func,
|
|
uint64_t param);
|
|
|
|
void init_interrupt(void);
|
|
void irq_handler(void);
|
|
|
|
void wfe(void);
|
|
|
|
extern interrupt_t *global_interrupt_pool;
|