summaryrefslogtreecommitdiff
path: root/libcpu
diff options
context:
space:
mode:
authorvisitor83 <root@wolflouis.(none)>2013-06-16 10:00:34 +0800
committervisitor83 <root@wolflouis.(none)>2013-06-16 10:00:34 +0800
commitc56fa7c9072dc70c4644681231ce9214b8e4347f (patch)
treeba55cace81ed78b11080da524fd93b1138b009f7 /libcpu
parent4cdb0154ba7418df177f4d6a9afd1fc1be6aa0ae (diff)
ident format
Signed-off-by: visitor83 <root@wolflouis.(none)>
Diffstat (limited to 'libcpu')
-rw-r--r--libcpu/arm/cortex-m3/cpuport.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/libcpu/arm/cortex-m3/cpuport.c b/libcpu/arm/cortex-m3/cpuport.c
index c96073a6a9..b4dcad2e16 100644
--- a/libcpu/arm/cortex-m3/cpuport.c
+++ b/libcpu/arm/cortex-m3/cpuport.c
@@ -102,7 +102,7 @@ rt_uint8_t *rt_hw_stack_init(void *tentry,
*/
void rt_hw_exception_install(rt_err_t (*exception_handle)(void* context))
{
- rt_exception_hook = exception_handle;
+ rt_exception_hook = exception_handle;
}
/*
@@ -110,15 +110,16 @@ void rt_hw_exception_install(rt_err_t (*exception_handle)(void* context))
*/
void rt_hw_hard_fault_exception(struct exception_stack_frame* context)
{
- extern long list_thread(void);
+ extern long list_thread(void);
- if (rt_exception_hook != RT_NULL)
- {
- rt_err_t result;
+ if (rt_exception_hook != RT_NULL)
+ {
+ rt_err_t result;
- result = rt_exception_hook(context);
- if (result == RT_EOK) return;
- }
+ result = rt_exception_hook(context);
+ if (result == RT_EOK)
+ return;
+ }
rt_kprintf("psr: 0x%08x\n", context->psr);
rt_kprintf(" pc: 0x%08x\n", context->pc);
@@ -135,7 +136,8 @@ void rt_hw_hard_fault_exception(struct exception_stack_frame* context)
list_thread();
#endif
- while (1);
+ while (1)
+ ;
}
/**