File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 29
29
#define NVIC_GetActive __NVIC_GetActive
30
30
#define NVIC_SetPriority vIRQ_SetPriority
31
31
#define NVIC_GetPriority vIRQ_GetPriority
32
+ #define NVIC_SystemReset vIRQ_SystemReset
32
33
33
34
#endif /* __UVISOR_API_NVIC_VIRTUAL_H__ */
Original file line number Diff line number Diff line change @@ -60,4 +60,9 @@ UVISOR_EXTERN void vIRQ_DisableAll(void);
60
60
* ::vIRQ_DisableAll for more information. */
61
61
UVISOR_EXTERN void vIRQ_EnableAll (void );
62
62
63
+ /** Reset the device.
64
+ * @warning Currently only the debug box can reset the device.
65
+ */
66
+ UVISOR_EXTERN void vIRQ_SystemReset (void );
67
+
63
68
#endif /* __UVISOR_API_INTERRUPTS_H__ */
Original file line number Diff line number Diff line change @@ -165,3 +165,13 @@ int vIRQ_GetLevel(void)
165
165
return UVISOR_SVC (UVISOR_SVC_ID_IRQ_LEVEL_GET , "" );
166
166
}
167
167
}
168
+
169
+ void vIRQ_SystemReset (void )
170
+ {
171
+ if (__uvisor_mode == 0 ) {
172
+ NVIC_SystemReset ();
173
+ }
174
+ else {
175
+ UVISOR_SVC (UVISOR_SVC_ID_DEBUG_REBOOT , "" );
176
+ }
177
+ }
You can’t perform that action at this time.
0 commit comments