-
Notifications
You must be signed in to change notification settings - Fork 5
/
irqs.h
28 lines (23 loc) · 1.43 KB
/
irqs.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
#ifndef IRQS_H
#define IRQS_H
#define ICRA (*(volatile unsigned char*) (0xfffee8)) /* Interupt control register A */
#define ICRB (*(volatile unsigned char*) (0xfffee9)) /* Interupt control register B */
#define ICRC (*(volatile unsigned char*) (0xfffeea)) /* Interupt control register C */
#define ISR (*(volatile unsigned char*) (0xfffeeb)) /* IRQ status register */
#define ISCRH (*(volatile unsigned char*) (0xfffeec)) /* IRQ sense control register H */
#define ISCRL (*(volatile unsigned char*) (0xfffeed)) /* IRQ sense control register L */
#define WUEMRB (*(volatile unsigned char*) (0xfffe44)) /* Wakeup event interrupt mask register B */
#define ABRKCR (*(volatile unsigned char*) (0xfffef4)) /* Address break control register */
#define BARA (*(volatile unsigned char*) (0xfffef5)) /* Break address register A */
#define BARB (*(volatile unsigned char*) (0xfffef6)) /* Break address register B */
#define BARC (*(volatile unsigned char*) (0xfffef7)) /* Break address register C */
#define IER (*(volatile unsigned char*) (0xffffc2)) /* Interrupt enable register */
#define KMIMR (*(volatile unsigned char*) (0xfffff1)) /* Keyboard matrix interrupt register 6 */
#define KMIMRA (*(volatile unsigned char*) (0xfffff2)) /* Keyboard matrix interrupt register A */
inline void disable_irqs() {
__asm__ __volatile__("\torc #0x80,ccr\n":::"cc");
}
inline void enable_irqs() {
__asm__ __volatile__("\tandc #0x7f,ccr\n":::"cc");
}
#endif /* IRQS_H */