From b9de9baf1c46a71e0fd82cfb8d5d727a80ee3ee1 Mon Sep 17 00:00:00 2001 From: xj Date: Wed, 7 Aug 2024 23:43:11 -0700 Subject: [PATCH] Adding interrupt codes --- .../usb/components/port/xhci/usb_hc_xhci.c | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c index 689c8f0eb..768b5c560 100644 --- a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c +++ b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c @@ -47,6 +47,10 @@ Modification: Modify USB Device Initialization in xHCI code to apply to XiZi AIO #include "usbh_hub.h" #include "xhci.h" +#include "libipc.h" +#include "libserial.h" +#include "usyscall.h" + /************************** Constant Definitions *****************************/ /************************** Variable Definitions *****************************/ @@ -1028,4 +1032,32 @@ int xhci_usbh_kill_urb(struct usbh_urb *urb){ void XHCI_USBH_IRQHandler(void *param){ -} \ No newline at end of file +} + +int IPC_DO_SERVE_FUNC(Ipc_xhci_intr)(void* ignore) +{ + printf("TEST_SW_HDLR: In %s()\n", __func__); + + return 0; +} + + +#if 0 + +int IPC_DO_SERVE_FUNC(Ipc_wait_xhci_intr)(void* ignore) +{ + // delay the this handle +#if 0 + while (!has_one_interrupt) { + yield(SYS_TASK_YIELD_NO_REASON); + } +#endif + // serve can be done by now + + return 0; +} +#endif + +IPC_SERVER_INTERFACE(Ipc_xhci_intr, 1); +// IPC_SERVER_THREAD_INTERFACE(Ipc_wait_xhci_intr, 1); +// IPC_SERVER_REGISTER_INTERFACES(IpcXhciIntrHandler, 2, Ipc_xhci_intr, Ipc_wait_xhci_intr);