Modules/USB - Working on a structure for the USB subsystem
[tpg/acess2.git] / Modules / USB / Core / main.c
index 9a6458e..baf1332 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,8 +29,9 @@ tDevFS_Driver gUSB_DrvInfo = {
                .IOCtl = USB_IOCtl
        }
 };
-tUSBDevice     *gUSB_RootHubs = NULL;
 tUSBHost       *gUSB_Hosts = NULL;
+tUSBHub        *gUSB_Hubs = NULL;
+tUSBHub        *gUSB_HubsEnd = NULL;
 
 // === CODE ===
 /**
@@ -41,7 +39,6 @@ tUSBHost      *gUSB_Hosts = NULL;
  */
 int USB_Install(char **Arguments)
 {
-       UHCI_Initialise();
        Log_Warning("USB", "Not Complete - Devel Only");
        return MODULE_ERR_OK;
 }
@@ -53,15 +50,12 @@ int USB_PollThread(void *unused)
 {
        for(;;)
        {
-               for( tUSBHost *host = gUSB_Hosts; host; host = host->Next )
-               {
-                       // host->CheckPorts(host);
-               }
-
-               for( tUSBDevice *dev = gUSB_RootHubs; dev; dev = dev->Next )
+               for( tUSBHub *hub = gUSB_Hubs; hub; hub = hub->Next )
                {
-                       
+                       hub->CheckPorts(hub, hub->Device);
                }
+               // TODO: Fine tune
+               Time_Delay(250);
        }
 }
 

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