]> Chaos Git - corbenik/ctrulib.git/commitdiff
Add timer-related SVC calls.
authorStapleButter <thetotalworm@gmail.com>
Fri, 31 Oct 2014 00:17:43 +0000 (01:17 +0100)
committerStapleButter <thetotalworm@gmail.com>
Fri, 31 Oct 2014 00:17:43 +0000 (01:17 +0100)
libctru/include/3ds/svc.h
libctru/source/svc.s

index 1ccf99213c0eb4f3d24cb7fbadcfffcb48eeb9fe..6e3ff60ce68edb4957768d501a4987fca01bdee7 100644 (file)
@@ -48,6 +48,10 @@ s32  svcReleaseMutex(Handle handle);
 s32  svcCreateEvent(Handle* event, u8 reset_type);
 s32  svcSignalEvent(Handle handle);
 s32  svcClearEvent(Handle handle);
+s32  svcCreateTimer(Handle* timer, u8 reset_type);
+s32  svcSetTimer(Handle timer, s64 initial, s64 interval);
+s32  svcCancelTimer(Handle timer);
+s32  svcClearTimer(Handle timer);
 s32  svcCreateMemoryBlock(Handle* memblock, u32 addr, u32 size, MemPerm my_perm, MemPerm other_perm);
 s32  svcMapMemoryBlock(Handle memblock, u32 addr, MemPerm my_perm, MemPerm other_perm);
 s32  svcUnmapMemoryBlock(Handle memblock, u32 addr);
index 0d047a4be45b6fefba9ea9053eaa691874adc1fd..6dbddddd02394d60c46df7e7b83b188c28448fca 100644 (file)
@@ -103,6 +103,33 @@ svcSignalEvent:
 svcClearEvent:
        svc 0x19
        bx lr
+       
+.global svcCreateTimer
+.type svcCreateTimer, %function
+svcCreateTimer:
+       str r0, [sp,#-4]!
+       svc 0x1A
+       ldr r2, [sp], #4
+       str r1, [r2]
+       bx lr
+       
+.global svcSetTimer
+.type svcSetTimer, %function
+svcSetTimer:
+       svc 0x1B
+       bx lr
+       
+.global svcCancelTimer
+.type svcCancelTimer, %function
+svcCancelTimer:
+       svc 0x1C
+       bx lr
+       
+.global svcClearTimer
+.type svcClearTimer, %function
+svcClearTimer:
+       svc 0x1D
+       bx lr
 
 .global svcCreateMemoryBlock
 .type svcCreateMemoryBlock, %function