-
Notifications
You must be signed in to change notification settings - Fork 0
/
interrupt.h
33 lines (26 loc) · 832 Bytes
/
interrupt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include <stdint.h>
#define IRQ_BASE 0x2000B200
#define IRQ_BASIC_ARM_TIMER 0x01
#define IRQ_BASIC_ARM_MAILBOX 0x02
#define IRQ_BASIC_ARM_DOORBELL_0 0x04
#define IRQ_BASIC_ARM_DOORBELL_1 0x08
#define IRQ_BASIC_GPU_0_HALTED 0x10
#define IRQ_BASIC_GPU_1_HALTED 0x20
#define IRQ_BASIC_ACCESS_ERROR_1 0x40
#define IRQ_BASIC_ACCESS_ERROR_0 0x80
typedef volatile struct
{
uint32_t irq_pending_basic;
uint32_t irq_pending_1;
uint32_t irq_pending_2;
uint32_t fiq_control;
uint32_t enable_irqs_1;
uint32_t enable_irqs_2;
uint32_t enable_irqs_basic;
uint32_t disable_irqs_1;
uint32_t disable_irqs_2;
uint32_t disable_irqs_basic;
} InterruptController_t;
extern void interrupt_init(void);
extern InterruptController_t* get_irq_controller(void);