summaryrefslogtreecommitdiff
path: root/libcpu
diff options
context:
space:
mode:
authorAligagago <[email protected]>2022-07-25 10:21:18 +0800
committerguo <[email protected]>2022-07-27 11:45:29 +0800
commit250b3cbc16d2632afa392f9857d044dac25b95f8 (patch)
treeaa38c868801385e07590cf8d499d3fb2efbfc322 /libcpu
parent1b55a1dedd0559de4edf9dac57199f75947173c3 (diff)
使用 AStyle.exe 统一代码格式
Diffstat (limited to 'libcpu')
-rw-r--r--libcpu/arm/common/backtrace.c10
-rw-r--r--libcpu/arm/common/div0.c2
-rw-r--r--libcpu/arm/common/showmem.c10
3 files changed, 11 insertions, 11 deletions
diff --git a/libcpu/arm/common/backtrace.c b/libcpu/arm/common/backtrace.c
index 388a409d88..bf3526703e 100644
--- a/libcpu/arm/common/backtrace.c
+++ b/libcpu/arm/common/backtrace.c
@@ -34,18 +34,18 @@ void rt_hw_backtrace(rt_uint32_t *fp, rt_uint32_t thread_entry)
rt_uint32_t i, pc, func_entry;
pc = *fp;
- rt_kprintf("[0x%x]\n", pc-0xC);
+ rt_kprintf("[0x%x]\n", pc - 0xC);
- for(i=0; i<10; i++)
+ for (i = 0; i < 10; i++)
{
- fp = (rt_uint32_t *)*(fp - 3);
+ fp = (rt_uint32_t *) * (fp - 3);
pc = *fp ;
func_entry = pc - 0xC;
- if(func_entry <= 0x30000000) break;
+ if (func_entry <= 0x30000000) break;
- if(func_entry == thread_entry)
+ if (func_entry == thread_entry)
{
rt_kprintf("EntryPoint:0x%x\n", func_entry);
diff --git a/libcpu/arm/common/div0.c b/libcpu/arm/common/div0.c
index 113778b43f..6c60dc7eba 100644
--- a/libcpu/arm/common/div0.c
+++ b/libcpu/arm/common/div0.c
@@ -6,7 +6,7 @@
* Change Logs:
* Date Author Notes
*/
-void __div0 (void)
+void __div0(void)
{
while (1) ;
}
diff --git a/libcpu/arm/common/showmem.c b/libcpu/arm/common/showmem.c
index 1a94ff1d9f..25b18d7fcf 100644
--- a/libcpu/arm/common/showmem.c
+++ b/libcpu/arm/common/showmem.c
@@ -12,18 +12,18 @@
void rt_hw_show_memory(rt_uint32_t addr, rt_uint32_t size)
{
- int i = 0, j =0;
+ int i = 0, j = 0;
RT_ASSERT(addr);
addr = addr & ~0xF;
- size = 4*((size + 3)/4);
+ size = 4 * ((size + 3) / 4);
- while(i < size)
+ while (i < size)
{
- rt_kprintf("0x%08x: ", addr );
+ rt_kprintf("0x%08x: ", addr);
- for(j=0; j<4; j++)
+ for (j = 0; j < 4; j++)
{
rt_kprintf("0x%08x ", *(rt_uint32_t *)addr);