OpenCores
URL https://opencores.org/ocsvn/mips32r1/mips32r1/trunk

Subversion Repositories mips32r1

[/] [mips32r1/] [trunk/] [Software/] [demos/] [XD3_I2C/] [src/] [os/] [exception_handler.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ayersg
#include "drivers/lcd.h"
2
#include "drivers/piezo.h"
3
 
4
void dead_loop(void)
5
{
6
        for (;;) {}
7
}
8
 
9
void mips32_handler_AdEL(void)
10
{
11
        LCD_clear();
12
        LCD_printString("AdEL");
13
        dead_loop();
14
}
15
 
16
void mips32_handler_AdES(void)
17
{
18
        LCD_clear();
19
        LCD_printString("AdES");
20
        dead_loop();
21
}
22
 
23
void mips32_handler_Bp(void)
24
{
25
        LCD_clear();
26
        LCD_printString("Bp");
27
        dead_loop();
28
}
29
 
30
void mips32_handler_CpU(void)
31
{
32
        LCD_clear();
33
        LCD_printString("CpU");
34
        dead_loop();
35
}
36
 
37
void mips32_handler_Ov(void)
38
{
39
        LCD_clear();
40
        LCD_printString("Ov");
41
        dead_loop();
42
}
43
 
44
void mips32_handler_RI(void)
45
{
46
        LCD_clear();
47
        LCD_printString("RI");
48
        dead_loop();
49
}
50
 
51
void mips32_handler_Sys(void)
52
{
53
        LCD_clear();
54
        LCD_printString("Sys");
55
        dead_loop();
56
}
57
 
58
void mips32_handler_Tr(void)
59
{
60
        LCD_clear();
61
        LCD_printString("Trap");
62
        dead_loop();
63
}
64
 
65
/* Timer */
66
void mips32_handler_HwInt5(void)
67
{
68
        static volatile char wait = 0;
69
 
70
        if (wait == 1) {
71
                wait++;
72
                Piezo_set(0, 0);
73
        }
74
        else if (wait < 1) {
75
                wait++;
76
        }
77
}
78
 
79
void mips32_handler_HwInt4(void)
80
{
81
        static volatile char count = 0;
82
 
83
        LCD_printByte(count);
84
        count++;
85
}
86
 
87
void mips32_handler_HwInt3(void)
88
{
89
        static volatile char count = 0;
90
 
91
        LCD_printByte(count);
92
        count++;
93
}
94
 
95
void mips32_handler_HwInt2(void)
96
{
97
        static volatile char count = 0;
98
 
99
        LCD_printByte(count);
100
        count++;
101
}
102
 
103
void mips32_handler_HwInt1(void)
104
{
105
        static volatile char count = 0;
106
 
107
        LCD_printByte(count);
108
        count++;
109
}
110
 
111
 
112
/* UART */
113
void mips32_handler_HwInt0(void)
114
{
115
        static volatile char count = 0;
116
 
117
        LCD_printByte(count);
118
        count++;
119
}
120
 
121
void mips32_handler_SwInt1(void)
122
{
123
        static volatile char count = 0;
124
 
125
        LCD_printByte(count);
126
        count++;
127
}
128
 
129
void mips32_handler_SwInt0(void)
130
{
131
        static volatile char count = 0;
132
 
133
        LCD_printByte(count);
134
        count++;
135
}
136
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.