Add NORETURN to __fatal_error
This commit is contained in:
parent
5c8db48541
commit
89b38d96c9
@ -85,7 +85,7 @@ void flash_error(int n) {
|
|||||||
led_state(PYB_LED_R2, 0);
|
led_state(PYB_LED_R2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __fatal_error(const char *msg) {
|
void NORETURN __fatal_error(const char *msg) {
|
||||||
for (volatile uint delay = 0; delay < 10000000; delay++) {
|
for (volatile uint delay = 0; delay < 10000000; delay++) {
|
||||||
}
|
}
|
||||||
led_state(1, 1);
|
led_state(1, 1);
|
||||||
@ -115,7 +115,6 @@ void MP_WEAK __assert_func(const char *file, int line, const char *func, const c
|
|||||||
(void)func;
|
(void)func;
|
||||||
printf("Assertion '%s' failed, at file %s:%d\n", expr, file, line);
|
printf("Assertion '%s' failed, at file %s:%d\n", expr, file, line);
|
||||||
__fatal_error("");
|
__fatal_error("");
|
||||||
while (1);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user