xh3irq.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2025 Tom Hert <git@annsann.eu>
3  * SPDX-FileCopyrightText: 2025 HAW Hamburg
4  * SPDX-License-Identifier: LGPL-2.1-only
5  */
6 
7 #pragma once
8 
9 #include <stdio.h>
10 
11 #include "panic.h"
12 #include "cpu_conf.h"
13 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 extern const void *vector_cpu[CPU_IRQ_NUMOF];
32 
41 #define MEIP_OFFSET 11
43 #define MEIP_MASK 0x1
49 #define MEINEXT_IRQ_OFFSET 2
51 #define MEINEXT_MASK 0x1FF
53 #define INTERRUPT_ARRAY_MASK_OFFSET 16
54 
59 uint32_t xh3irq_has_pending(void);
60 
65 void xh3irq_handler(void);
66 
71 void xh3irq_enable_irq(uint32_t irq_no);
72 
77 void xh3irq_disable_irq(uint32_t irq_no);
78 
84 void xh3irq_force_irq(uint32_t irq_no);
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
Crash handling header.
void xh3irq_handler(void)
The main IRQ handler, called from the assembly IRQ handler.
uint32_t xh3irq_has_pending(void)
Check if there are any pending interrupts.
void xh3irq_force_irq(uint32_t irq_no)
Force the given IRQ number to be pending.
void xh3irq_enable_irq(uint32_t irq_no)
Enable the given IRQ number.
void xh3irq_disable_irq(uint32_t irq_no)
Disable the given IRQ number.
const void * vector_cpu[CPU_IRQ_NUMOF]
CPU specific interrupt vector table.