X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Modules%2FUSB%2FCore%2Fmain.c;h=9a6458ef3cadf34193dc3b18189a117f58255b3c;hb=1474ce5c1ba164bbccfefa411883805d12a0dc62;hp=36e898ccdcd268b40a65fcc3a0bb13b37da0b3db;hpb=ccd6cf2af99fdc050888c70eb4d59f078a15a2da;p=tpg%2Facess2.git diff --git a/Modules/USB/Core/main.c b/Modules/USB/Core/main.c index 36e898cc..9a6458ef 100644 --- a/Modules/USB/Core/main.c +++ b/Modules/USB/Core/main.c @@ -17,7 +17,7 @@ extern int UHCI_Initialise(void); int USB_Install(char **Arguments); void USB_Cleanup(void); char *USB_ReadDir(tVFS_Node *Node, int Pos); -tVFS_Node *USB_FindDir(tVFS_Node *Node, char *Name); +tVFS_Node *USB_FindDir(tVFS_Node *Node, const char *Name); int USB_IOCtl(tVFS_Node *Node, int Id, void *Data); // === GLOBALS === @@ -32,12 +32,11 @@ tDevFS_Driver gUSB_DrvInfo = { .IOCtl = USB_IOCtl } }; -tUSBDevice *gUSB_Devices = NULL; +tUSBDevice *gUSB_RootHubs = NULL; tUSBHost *gUSB_Hosts = NULL; // === CODE === /** - * \fn int ModuleLoad() * \brief Called once module is loaded */ int USB_Install(char **Arguments) @@ -48,7 +47,25 @@ int USB_Install(char **Arguments) } /** - * \fn void USB_Cleanup() + * \brief USB polling thread + */ +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 ) + { + + } + } +} + +/** * \brief Called just before module is unloaded */ void USB_Cleanup() @@ -65,10 +82,10 @@ char *USB_ReadDir(tVFS_Node *Node, int Pos) } /** - * \fn tVFS_Node *USB_FindDir(tVFS_Node *Node, char *Name) + * \fn tVFS_Node *USB_FindDir(tVFS_Node *Node, const char *Name) * \brief Locate an entry in the USB root */ -tVFS_Node *USB_FindDir(tVFS_Node *Node, char *Name) +tVFS_Node *USB_FindDir(tVFS_Node *Node, const char *Name) { return NULL; }