X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FUSB%2FCore%2Fmain.c;h=36a1363be49caa91f6f6bdf351cdcdd5cacb3181;hb=8aad7ffe6c2e7e5dbb06a5baf59ca43ce1c12317;hp=d99ef3a5966b9bbedefc1c30a200a12cad4910c0;hpb=662713ac7494f05339cee056a3d9f72e2357c492;p=tpg%2Facess2.git diff --git a/Modules/USB/Core/main.c b/Modules/USB/Core/main.c index d99ef3a5..36a1363b 100644 --- a/Modules/USB/Core/main.c +++ b/Modules/USB/Core/main.c @@ -10,6 +10,10 @@ #include #include "usb.h" +// === IMPORTS === +extern void USB_PollThread(void *unused); +extern void USB_AsyncThread(void *Unused); + // === PROTOTYPES === int USB_Install(char **Arguments); void USB_Cleanup(void); @@ -30,8 +34,6 @@ tDevFS_Driver gUSB_DrvInfo = { } }; tUSBHost *gUSB_Hosts = NULL; -tUSBDevice *gUSB_InterruptDevs = NULL; -tUSBDevice *gUSB_InterruptLast = NULL; // === CODE === /** @@ -40,25 +42,13 @@ tUSBDevice *gUSB_InterruptLast = NULL; int USB_Install(char **Arguments) { Log_Warning("USB", "Not Complete - Devel Only"); + + Proc_SpawnWorker(USB_PollThread, NULL); + Proc_SpawnWorker(USB_AsyncThread, NULL); + return MODULE_ERR_OK; } -/** - * \brief USB polling thread - */ -int USB_PollThread(void *unused) -{ - for(;;) - { - for( tUSBDevice *dev = gUSB_InterruptDevs; dev; dev = dev->Next ) - { -// hub->CheckPorts(hub, hub->Device); - } - // TODO: Fine tune - Time_Delay(250); - } -} - /** * \brief Called just before module is unloaded */