Using while(1) instead of exit.
The exit function can significantly increase code size, and adds dependency on stdlibc.
This commit is contained in:
@@ -25,14 +25,14 @@ void scb_reset_core(void)
|
|||||||
{
|
{
|
||||||
SCB_AIRCR = SCB_AIRCR_VECTKEY | SCB_AIRCR_VECTRESET;
|
SCB_AIRCR = SCB_AIRCR_VECTKEY | SCB_AIRCR_VECTRESET;
|
||||||
|
|
||||||
exit(1);
|
while(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void scb_reset_system(void)
|
void scb_reset_system(void)
|
||||||
{
|
{
|
||||||
SCB_AIRCR = SCB_AIRCR_VECTKEY | SCB_AIRCR_SYSRESETREQ;
|
SCB_AIRCR = SCB_AIRCR_VECTKEY | SCB_AIRCR_SYSRESETREQ;
|
||||||
|
|
||||||
exit(1);
|
while(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void scb_set_priority_grouping(u32 prigroup)
|
void scb_set_priority_grouping(u32 prigroup)
|
||||||
|
|||||||
Reference in New Issue
Block a user