improve sys interface for flash_erase_all_and_exec

This commit is contained in:
NIIBE Yutaka
2012-05-29 09:41:25 +09:00
parent e2ab8c9183
commit 08563d5a65
5 changed files with 37 additions and 10 deletions

View File

@@ -65,11 +65,11 @@ flash_protect (void)
}
static inline void __attribute__((noreturn))
flash_mass_erase_and_exec (void)
flash_erase_all_and_exec (void (*entry)(void))
{
void (*func) (void) = (void (*)(void))vector[10];
void (*func) (void (*)(void)) = (void (*)(void (*)(void)))vector[10];
(*func) ();
(*func) (entry);
for (;;);
}