cpuport.c
4.97 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
/*
* Copyright (c) 2021, Shenzhen Academy of Aerospace Technology
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-11-16 Dystopia the first version
*/
#include <rthw.h>
#include <rtthread.h>
#include "trap.h"
/*------------ rt_hw_cpu_shutdown() function ----------------------------------
* DESCRIPTION: Shutdown CPU
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
RT_WEAK void rt_hw_cpu_shutdown(void)
{
rt_kprintf("shutdown...\n");
rt_hw_interrupt_disable();
RT_ASSERT(0);
}
/*------------ nested_exception_handler() function ---------------------------
* DESCRIPTION: Function handles Nested Exception
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
void nested_exception_handler(void)
{
for(;;){}
}
/*------------ hw_nmi_handler() function --------------------------------------
* DESCRIPTION: Function handles NMI interrupt
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
void hw_nmi_handler(struct rt_hw_exp_stack_register *regs)
{
for(;;){}
}
/*------------ hw_bad_handler() function --------------------------------------
* DESCRIPTION: Function handles Bad interrupt
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
void hw_bad_handler(void)
{
for(;;){}
}
/*------------ hw_int4_handler() function -------------------------------------
* DESCRIPTION: Function handles INT4 interrupt
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
void hw_int4_handler(void)
{
}
/*------------ hw_int5_handler() function -------------------------------------
* DESCRIPTION: Function handles INT5 interrupt
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
void hw_int5_handler(void)
{
}
/*------------ hw_int6_handler() function -------------------------------------
* DESCRIPTION: Function handles INT6 interrupt
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
void hw_int6_handler(void)
{
}
/*------------ hw_int7_handler() function -------------------------------------
* DESCRIPTION: Function handles INT7 interrupt
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
void hw_int7_handler(void)
{
}
/*------------ hw_int8_handler() function -------------------------------------
* DESCRIPTION: Function handles INT8 interrupt
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
void hw_int8_handler(void)
{
}
/*------------ hw_int9_handler() function -------------------------------------
* DESCRIPTION: Function handles INT9 interrupt
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
void hw_int9_handler(void)
{
}
/*------------ hw_int10_handler() function ------------------------------------
* DESCRIPTION: Function handles INT10 interrupt
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
void hw_int10_handler(void)
{
}
/*------------ hw_int11_handler() function ------------------------------------
* DESCRIPTION: Function handles INT11 interrupt
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
void hw_int11_handler(void)
{
}
/*------------ hw_int12_handler() function ------------------------------------
* DESCRIPTION: Function handles INT12 interrupt
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
void hw_int12_handler(void)
{
}
/*------------ hw_int13_handler() function ------------------------------------
* DESCRIPTION: Function handles INT13 interrupt
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
void hw_int13_handler(void)
{
}
/*------------------ hw_int14_handler() function ------------------------------
* DESCRIPTION: Function handles INT14 interrupt
* ARGUMENTS:
* None
* RETURNED VALUE:
-----------------------------------------------------------------------------*/
void hw_int14_handler(void)
{
extern void rt_hw_systick_isr();
rt_hw_systick_isr();
}
/*------------ hw_int15_handler() function ------------------------------------
* DESCRIPTION: Function handles INT15 interrupt
* ARGUMENTS:
* None
* RETURNED VALUE: None
-----------------------------------------------------------------------------*/
void hw_int15_handler(void)
{
}