From 3a366988a0077474075d8f33ad76514d2fa0c5d6 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Fri, 24 Dec 2021 15:21:54 -0800 Subject: Standardized Formatting --- src/sys/core.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/sys/core.h') diff --git a/src/sys/core.h b/src/sys/core.h index 74bac74..d70f406 100644 --- a/src/sys/core.h +++ b/src/sys/core.h @@ -3,15 +3,18 @@ extern unsigned long cntfrq; -static inline unsigned long load32(unsigned long addr) { +static inline unsigned long load32(unsigned long addr) +{ return *(volatile unsigned long*)addr; } -static inline void store32(unsigned long value, unsigned long addr) { +static inline void store32(unsigned long value, unsigned long addr) +{ *(volatile unsigned long*)addr = value; } -static inline void delay(unsigned long cycles) { +static inline void delay(unsigned long cycles) +{ asm volatile("__delay_%=: subs %[cycles], %[cycles], #1;bne __delay_%=\n" : "=r"(cycles): [cycles]"0"(cycles) : "cc"); } @@ -113,7 +116,7 @@ enum PM_RSTC_RESET = 0x00000102, }; -void sysinit(); -void postinit(); +void sysinit(void); +void postinit(void); #endif -- cgit v1.2.1