From 3fff6023602822531efdae30bc8ebf862967f1ef Mon Sep 17 00:00:00 2001 From: Friedrich Beckmann Date: Mon, 25 Jul 2022 17:55:39 +0200 Subject: Initial Commit --- VexRiscvSocSoftware/libs/interrupt.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 VexRiscvSocSoftware/libs/interrupt.h (limited to 'VexRiscvSocSoftware/libs/interrupt.h') diff --git a/VexRiscvSocSoftware/libs/interrupt.h b/VexRiscvSocSoftware/libs/interrupt.h new file mode 100644 index 0000000..23b7d27 --- /dev/null +++ b/VexRiscvSocSoftware/libs/interrupt.h @@ -0,0 +1,17 @@ +#ifndef INTERRUPTCTRL_H_ +#define INTERRUPTCTRL_H_ + +#include + +typedef struct +{ + volatile uint32_t PENDINGS; + volatile uint32_t MASKS; +} InterruptCtrl_Reg; + +static void interruptCtrl_init(InterruptCtrl_Reg* reg){ + reg->MASKS = 0; + reg->PENDINGS = 0xFFFFFFFF; +} + +#endif /* INTERRUPTCTRL_H_ */ -- cgit v1.2.3