diff options
| author | Prakxo <87568477+Prakxo@users.noreply.github.com> | 2024-07-01 17:02:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-01 08:02:29 -0700 |
| commit | 0e66d077f8cf321c3f11978f531502ec592c0cdb (patch) | |
| tree | f726b2a6bfcca0e45d5cacc9604dbcaaf5e197df /src/code/lb_rtc.c | |
| parent | 235b6575c208667fa39592bfe0c885c3ca006595 (diff) | |
lbrtc OK (#196)
* lbrtc OK
* format
* names
* format 2
* review + docs
* format
Diffstat (limited to 'src/code/lb_rtc.c')
| -rw-r--r-- | src/code/lb_rtc.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/code/lb_rtc.c b/src/code/lb_rtc.c index d9e6453..885fb90 100644 --- a/src/code/lb_rtc.c +++ b/src/code/lb_rtc.c @@ -1,12 +1,7 @@ #include "lb_rtc.h" +#include "lbrtc.h" #include "m_common_data.h" #include "padmgr.h" -#include "722970.h" -#include "721EC0.h" -#include "7220C0.h" -#include "722310.h" -#include "722AB0.h" -#include "722880.h" #include "macros.h" #include "attributes.h" @@ -22,7 +17,7 @@ s32 lbRTC_Initial() { if (l_lbRTC_isInitial == 1) { mq = padmgr_LockSerialMesgQ(); l_lbRTC_isInitial = 0; - B_80145620_jp = func_800FECD0_jp(mq); + B_80145620_jp = lbrtc_init(mq); padmgr_UnlockSerialMesgQ(mq); } return B_80145620_jp; @@ -36,7 +31,7 @@ s32 lbRTC_IsOki(lbRTC_time_c* ptr) { if (isInitial == 0) { mq = padmgr_LockSerialMesgQ(); - isInitial = func_800FE220_jp(mq, ptr); + isInitial = lbrtc_getTime(mq, ptr); padmgr_UnlockSerialMesgQ(mq); if (isInitial == 0) { return isInitial; @@ -97,7 +92,7 @@ void lbRTC_SetTime(lbRTC_time_c* time) { if (common_data.time.rtcEnabled == 1 && !common_data.time.rtcCrashed) { time->weekday = lbRTC_Week(time->year, time->month, time->day); mq = padmgr_LockSerialMesgQ(); - func_800FE670_jp(mq, time); + lbrtc_setTime(mq, time); padmgr_UnlockSerialMesgQ(mq); } else { lbRTC_TimeCopy(&common_data.time.rtcTime, time); @@ -109,7 +104,7 @@ void lbRTC_GetTime(lbRTC_time_c* time) { if (common_data.time.rtcEnabled == 1 && !common_data.time.rtcCrashed) { mq = padmgr_LockSerialMesgQ(); - func_800FE220_jp(mq, time); + lbrtc_getTime(mq, time); padmgr_UnlockSerialMesgQ(mq); } else { lbRTC_TimeCopy(time, &common_data.time.rtcTime); @@ -291,7 +286,7 @@ s32 lbRTC_IntervalTime(lbRTC_time_c* t0, lbRTC_time_c* t1) { t2 = *t0; t3 = *t1; - func_800FF060_jp(&t3, &t2); + lbrtc_GetIntervalMinutes(&t3, &t2); } const int total_days[2][lbRTC_MONTHS_MAX + 1] = { |
