From 8545d9d56581c6b6706684fd0a4ba903cf53c595 Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Sun, 21 Apr 2013 19:13:35 -0700 Subject: [PATCH] Using while(1) instead of exit. The exit function can significantly increase code size, and adds dependency on stdlibc. --- lib/cm3/scb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cm3/scb.c b/lib/cm3/scb.c index 098c00a4..07684fee 100644 --- a/lib/cm3/scb.c +++ b/lib/cm3/scb.c @@ -25,14 +25,14 @@ void scb_reset_core(void) { SCB_AIRCR = SCB_AIRCR_VECTKEY | SCB_AIRCR_VECTRESET; - exit(1); + while(1); } void scb_reset_system(void) { SCB_AIRCR = SCB_AIRCR_VECTKEY | SCB_AIRCR_SYSRESETREQ; - exit(1); + while(1); } void scb_set_priority_grouping(u32 prigroup)