Skip to content
Snippets Groups Projects
Commit 8ac93244 authored by rahix's avatar rahix
Browse files

fix(libcard10): Mark card10_reset() as noreturn


card10_reset() won't ever return to where it was called from.  Telling
the compiler this can help with program-flow analysis.

Signed-off-by: default avatarRahix <rahix@rahix.de>
parent a9e1b238
No related branches found
No related tags found
No related merge requests found
...@@ -224,7 +224,7 @@ void card10_poll(void) ...@@ -224,7 +224,7 @@ void card10_poll(void)
portexpander_poll(); portexpander_poll();
} }
void card10_reset(void) void __attribute__((noreturn)) card10_reset(void)
{ {
printf("Resetting ...\n"); printf("Resetting ...\n");
/* /*
...@@ -235,6 +235,9 @@ void card10_reset(void) ...@@ -235,6 +235,9 @@ void card10_reset(void)
__asm volatile("nop"); __asm volatile("nop");
} }
MXC_GCR->rstr0 = MXC_F_GCR_RSTR0_SYSTEM; MXC_GCR->rstr0 = MXC_F_GCR_RSTR0_SYSTEM;
while (1)
__WFI();
} }
void GPIO0_IRQHandler(void) void GPIO0_IRQHandler(void)
......
...@@ -15,5 +15,5 @@ void core1_start(void *isr); ...@@ -15,5 +15,5 @@ void core1_start(void *isr);
void core1_stop(void); void core1_stop(void);
void card10_poll(void); void card10_poll(void);
void card10_reset(void); void card10_reset(void) __attribute__((noreturn));
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment