]> Chaos Git - corbenik/ctrulib.git/commitdiff
Implement svcBindInterrupt and svcUnbindInterrupt
authorTuxSH <tuxsh@sfr.fr>
Fri, 24 Jun 2016 22:07:03 +0000 (00:07 +0200)
committerTuxSH <tuxsh@sfr.fr>
Fri, 24 Jun 2016 22:07:03 +0000 (00:07 +0200)
libctru/include/3ds/svc.h
libctru/source/svc.s

index 96679636aa136d8ddb1921e0c5727b783b8b3e6f..b953f5545826d9a46710a797e666252486bbb13f 100644 (file)
@@ -821,6 +821,22 @@ Result svcAcceptSession(Handle* session, Handle port);
  * @param replyTarget Handle of the session to reply to.
  */
 Result svcReplyAndReceive(s32* index, Handle* handles, s32 handleCount, Handle replyTarget);
+
+/**
+ * @brief Binds an event handle to an ARM11 interrupt.
+ * @param interruptId Interrupt identfier (see https://www.3dbrew.org/wiki/ARM11_Interrupts).
+ * @param event Event handle to bind to the given interrupt.
+ * @param priority Priority of the interrupt for the current process.
+ * @param isManualClear Indicates whether the interrupt has to be manually cleared or not.
+ */
+Result svcBindInterrupt(u32 interruptId, Handle event, s32 priority, bool isManualClear);
+
+/**
+ * @brief Unbinds an event handle from an ARM11 interrupt.
+ * @param interruptId Interrupt identfier, see (see https://www.3dbrew.org/wiki/ARM11_Interrupts).
+ * @param event Event handle to unbind from the given interrupt.
+ */
+Result svcUnbindInterrupt(u32 interruptId, Handle event);
 ///@}
 
 ///@name Time
index 309487baf146b5117af4282bcafbdbf156459288..d3815e3bd56d9822ae04e477697a1191563c0346 100644 (file)
@@ -352,6 +352,14 @@ SVC_BEGIN svcReplyAndReceive
        add sp, sp, #4
        bx  lr
 
+SVC_BEGIN svcBindInterrupt
+       svc 0x50
+       bx lr
+
+SVC_BEGIN svcUnbindInterrupt
+       svc 0x51
+       bx lr
+
 SVC_BEGIN svcInvalidateProcessDataCache
        svc 0x52
        bx  lr