#include <modules.h>
#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);
}
};
tUSBHost *gUSB_Hosts = NULL;
-tUSBInterface *gUSB_InterruptDevs = NULL;
-tUSBInterface *gUSB_InterruptLast = NULL;
// === CODE ===
/**
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( tUSBInterface *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
*/