summaryrefslogtreecommitdiff
path: root/arm9/asm/RTC_internal.s
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2020-05-20 14:59:56 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2020-05-20 14:59:56 -0400
commitd1d3fce4b6be10ed7186a6c36bc27fe575b593db (patch)
tree4f31107f4446b69106acb0673a383dfdaf88473e /arm9/asm/RTC_internal.s
parent6103ab0ca0962682095e58779079cb4c8c054b14 (diff)
parentde389305733545e2b6fac6c8dcb33d76a7446481 (diff)
Merge branch 'master' of github.com:martmists/pokediamond into pikalax_work
Diffstat (limited to 'arm9/asm/RTC_internal.s')
-rw-r--r--arm9/asm/RTC_internal.s53
1 files changed, 53 insertions, 0 deletions
diff --git a/arm9/asm/RTC_internal.s b/arm9/asm/RTC_internal.s
new file mode 100644
index 00000000..408b630c
--- /dev/null
+++ b/arm9/asm/RTC_internal.s
@@ -0,0 +1,53 @@
+ .include "asm/macros.inc"
+ .include "global.inc"
+
+ .text
+
+ arm_func_start RtcSendPxiCommand
+RtcSendPxiCommand: ; 0x020D61D4
+ stmdb sp!, {lr}
+ sub sp, sp, #0x4
+ mov r0, r0, lsl #0x8
+ and r1, r0, #0x7f00
+ mov r0, #0x5
+ mov r2, #0x0
+ bl PXI_SendWordByFifo
+_020D61F0: ; 0x020D61F0
+ cmp r0, #0x0
+ movge r0, #0x1
+ movlt r0, #0x0
+ add sp, sp, #0x4
+ ldmia sp!, {lr}
+ bx lr
+
+ arm_func_start RTCi_WriteRawStatus2Async
+RTCi_WriteRawStatus2Async:
+ ldr ip, _020D6214 ; =RtcSendPxiCommand
+ mov r0, #0x27
+ bx r12
+ .balign 4
+_020D6214: .word RtcSendPxiCommand
+
+ arm_func_start RTCi_ReadRawTimeAsync
+RTCi_ReadRawTimeAsync:
+ ldr ip, _020D6224 ; =RtcSendPxiCommand
+ mov r0, #0x12
+ bx r12
+ .balign 4
+_020D6224: .word RtcSendPxiCommand
+
+ arm_func_start RTCi_ReadRawDateAsync
+RTCi_ReadRawDateAsync:
+ ldr ip, _020D6234 ; =RtcSendPxiCommand
+ mov r0, #0x11
+ bx r12
+ .balign 4
+_020D6234: .word RtcSendPxiCommand
+
+ arm_func_start RTCi_ReadRawDateTimeAsync
+RTCi_ReadRawDateTimeAsync:
+ ldr ip, _020D6244 ; =RtcSendPxiCommand
+ mov r0, #0x10
+ bx r12
+ .balign 4
+_020D6244: .word RtcSendPxiCommand