diff options
| author | [email protected] <[email protected]> | 2012-12-24 06:59:14 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-12-24 06:59:14 +0000 |
| commit | 468ade5e98601ce5f66c5b5b1da243c98acdce36 (patch) | |
| tree | 527e097be2d1976fbe80253ad1e91a5d9d7b3e7c /libcpu/arm/cortex-m3 | |
| parent | 555ccc5fa9954dec9bb752e6d99631207be14589 (diff) | |
fixed the coding style in libcpu/arm
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2518 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'libcpu/arm/cortex-m3')
| -rw-r--r-- | libcpu/arm/cortex-m3/cpuport.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/libcpu/arm/cortex-m3/cpuport.c b/libcpu/arm/cortex-m3/cpuport.c index 967a6610c5..334ccf5a96 100644 --- a/libcpu/arm/cortex-m3/cpuport.c +++ b/libcpu/arm/cortex-m3/cpuport.c @@ -8,10 +8,10 @@ * http://www.rt-thread.org/license/LICENSE * * Change Logs: - * Date Author Notes - * 2009-01-05 Bernard first version - * 2011-02-14 onelife Modify for EFM32 - * 2011-06-17 onelife Merge all of the C source code into cpuport.c + * Date Author Notes + * 2009-01-05 Bernard first version + * 2011-02-14 onelife Modify for EFM32 + * 2011-06-17 onelife Merge all of the C source code into cpuport.c * 2012-12-23 aozima stack addr align to 8byte. */ @@ -58,18 +58,18 @@ rt_uint32_t rt_thread_switch_interrupt_flag; * * @return stack address */ -rt_uint8_t *rt_hw_stack_init(void *tentry, - void *parameter, +rt_uint8_t *rt_hw_stack_init(void *tentry, + void *parameter, rt_uint8_t *stack_addr, - void *texit) + void *texit) { struct stack_frame *stack_frame; rt_uint8_t *stk; unsigned long i; - stk = stack_addr + sizeof(rt_uint32_t); - stk = (rt_uint8_t*)RT_ALIGN_DOWN((rt_uint32_t)stk, 8); - stk -= sizeof(struct stack_frame); + stk = stack_addr + sizeof(rt_uint32_t); + stk = (rt_uint8_t *)RT_ALIGN_DOWN((rt_uint32_t)stk, 8); + stk -= sizeof(struct stack_frame); stack_frame = (struct stack_frame *)stk; @@ -109,16 +109,18 @@ void rt_hw_hard_fault_exception(struct exception_stack_frame* contex) rt_kprintf("r00: 0x%08x\n", contex->r0); rt_kprintf("hard fault on thread: %s\n", rt_current_thread->name); + #ifdef RT_USING_FINSH list_thread(); #endif + while (1); } /** * shutdown CPU */ -void rt_hw_cpu_shutdown() +void rt_hw_cpu_shutdown(void) { rt_kprintf("shutdown...\n"); |
