From e0725bca55b2c2e081ea4cee0c4bea9ec5533164 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 2 Sep 2017 23:37:06 +0200 Subject: move variables to rtc.c --- src/rtc.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) (limited to 'src/rtc.c') diff --git a/src/rtc.c b/src/rtc.c index 7dabb2efa..ca8b9567e 100644 --- a/src/rtc.c +++ b/src/rtc.c @@ -3,16 +3,34 @@ #include "string_util.h" #include "text.h" -extern u16 sErrorStatus; -extern struct SiiRtcInfo sRtc; -extern u8 sProbeResult; -extern u16 sSavedIme; +// iwram bss +IWRAM_DATA static u16 sErrorStatus; +IWRAM_DATA static struct SiiRtcInfo sRtc; +IWRAM_DATA static u8 sProbeResult; +IWRAM_DATA static u16 sSavedIme; -extern struct Time gLocalTime; +// iwram common +struct Time gLocalTime; -extern const struct SiiRtcInfo sRtcDummy; +// const rom -extern const s32 sNumDaysInMonths[12]; +static const struct SiiRtcInfo sRtcDummy = {0, MONTH_JAN, 1}; // 2000 Jan 1 + +static const s32 sNumDaysInMonths[12] = +{ + 31, + 28, + 31, + 30, + 31, + 30, + 31, + 31, + 30, + 31, + 30, + 31, +}; void RtcDisableInterrupts(void) { -- cgit v1.2.3