+
+void UHCI_CheckPortUpdate(tUHCI_Controller *Host)
+{
+ // Enable ports
+ for( int i = 0; i < 2; i ++ )
+ {
+ int port = Host->IOBase + PORTSC1 + i*2;
+ // Check for port change
+ if( !(inw(port) & 0x0002) ) continue;
+ outw(port, 0x0002);
+
+ // Check if the port is connected
+ if( !(inw(port) & 1) )
+ {
+ // TODO: Tell the USB code it's gone?
+ continue;
+ }
+ else
+ {
+ LOG("Port %i has something", i);
+ // Reset port (set bit 9)
+ outw( port, 0x0100 );
+ Time_Delay(50); // 50ms delay
+ outw( port, inw(port) & ~0x0100 );
+ // Enable port
+ Time_Delay(50); // 50ms delay
+ outw( port, inw(port) & 0x0004 );
+ }
+ }
+}
+
+void UHCI_InterruptHandler(int IRQ, void *Ptr)
+{
+ Log_Debug("UHCI", "UHIC Interrupt");
+}