diff options
author | Seth Barberee <seth.barberee@gmail.com> | 2021-05-15 19:31:22 -0500 |
---|---|---|
committer | Seth Barberee <seth.barberee@gmail.com> | 2021-05-15 19:31:22 -0500 |
commit | 61776017dc42d46aa5cefcb40429d7d96984f703 (patch) | |
tree | 261f97b3b61ed678eca9d036e10d6056de2880a0 /arm9/lib/src/RTC_internal.c | |
parent | 21ebb3b01cdd47bd7aa56affe7d2179d167453bc (diff) |
decomp 3 files
Diffstat (limited to 'arm9/lib/src/RTC_internal.c')
-rw-r--r-- | arm9/lib/src/RTC_internal.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arm9/lib/src/RTC_internal.c b/arm9/lib/src/RTC_internal.c new file mode 100644 index 00000000..2e997eed --- /dev/null +++ b/arm9/lib/src/RTC_internal.c @@ -0,0 +1,32 @@ +#include "global.h" +#include "PXI_fifo.h" +#include "RTC_internal.h" + +u32 RTCi_ReadRawDateTimeAsync(void) +{ + return RtcSendPxiCommand(16); +} + +u32 RTCi_ReadRawDateAsync(void) +{ + return RtcSendPxiCommand(17); +} + +u32 RTCi_ReadRawTimeAsync(void) +{ + return RtcSendPxiCommand(18); +} + +u32 RTCi_WriteRawStatus2Async(void) +{ + return RtcSendPxiCommand(39); +} + +u32 RtcSendPxiCommand(u8 command) +{ + s32 data = command << 8 & 0x7f00; + if(PXI_SendWordByFifo(PXI_FIFO_TAG_RTC, data, FALSE) >= 0) + return 1; + else + return 0; +} |