Modules/USB - Working on UHCI callbacks
[tpg/acess2.git] / Modules / USB / Core / main.c
index 712f602..d99ef3a 100644 (file)
@@ -10,9 +10,6 @@
 #include <modules.h>
 #include "usb.h"
 
-// === IMPORTS ===
-extern int     UHCI_Initialise(void);
-
 // === PROTOTYPES ===
  int   USB_Install(char **Arguments);
 void   USB_Cleanup(void);
@@ -32,23 +29,37 @@ tDevFS_Driver       gUSB_DrvInfo = {
                .IOCtl = USB_IOCtl
        }
 };
-tUSBDevice     *gUSB_Devices = NULL;
 tUSBHost       *gUSB_Hosts = NULL;
+tUSBDevice     *gUSB_InterruptDevs = NULL;
+tUSBDevice     *gUSB_InterruptLast = NULL;
 
 // === CODE ===
 /**
- * \fn int ModuleLoad()
  * \brief Called once module is loaded
  */
 int USB_Install(char **Arguments)
 {
-       UHCI_Initialise();
        Log_Warning("USB", "Not Complete - Devel Only");
        return MODULE_ERR_OK;
 }
 
 /**
- * \fn void USB_Cleanup()
+ * \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
  */
 void USB_Cleanup()

UCC git Repository :: git.ucc.asn.au