You power the port, then you remove power from the port.
Code:
outportw(uhcibase+R_PORTS1,inportw(uhcibase+R_PORTS1) | 0b0000001000000000);
outportw(uhcibase+R_PORTS2,inportw(uhcibase+R_PORTS2) | 0b0000001000000000);
mssleep(5);
outportw(uhcibase+R_PORTS1,(inportw(uhcibase+R_PORTS1) & 0b1111110111111111) | 0b0000000000000100);
outportw(uhcibase+R_PORTS2,(inportw(uhcibase+R_PORTS2) & 0b1111110111111111) | 0b0000000000000100);
A port will
not show a connection if there is no power....
Maybe you meant?
Code:
outportw(uhcibase+R_PORTS1,(inportw(uhcibase+R_PORTS1) & ~0b1111110111111111) | 0b0000000000000100);
outportw(uhcibase+R_PORTS2,(inportw(uhcibase+R_PORTS2) & ~0b1111110111111111) | 0b0000000000000100);
However, note that technically, depending on where you are in the setup, you should know exactly what bits are set, so:
Code:
outportw(uhcibase+R_PORTS1,0b0000001000000100);
outportw(uhcibase+R_PORTS2,0b0000001000000100);
works also. However, before you enable a port, you need to see if there is something connected, right?
Ben
-
http://www.fysnet.net/the_universal_serial_bus.htm