Guest User

Untitled

a guest
Aug 15th, 2013
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. static void ehci_detectDevice(ehci_t* e, uint8_t j)
  2. {
  3. ehci_resetPort(e,j);
  4. if (e->enabledPortFlag && (e->OpRegs->PORTSC[j] & PSTS_POWERON) && (e->OpRegs->PORTSC[j] & PSTS_CONNECTED)) // enabled, device attached
  5. {
  6. if(e->OpRegs->PORTSC[j] & PSTS_ENABLED) // High speed
  7. {
  8. writeInfo(0, "Port: %u, hi-speed device attached", j+1);
  9. ehci_setupUSBDevice(e, j);
  10. }
  11. else // Full speed
  12. {
  13. writeInfo(0, "Port: %u, full-speed device attached", j+1);
  14. e->OpRegs->PORTSC[j] |= PSTS_COMPANION_HC_OWNED; // release it to the cHC
  15. }
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment