Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void ehci_detectDevice(ehci_t* e, uint8_t j)
- {
- ehci_resetPort(e,j);
- if (e->enabledPortFlag && (e->OpRegs->PORTSC[j] & PSTS_POWERON) && (e->OpRegs->PORTSC[j] & PSTS_CONNECTED)) // enabled, device attached
- {
- if(e->OpRegs->PORTSC[j] & PSTS_ENABLED) // High speed
- {
- writeInfo(0, "Port: %u, hi-speed device attached", j+1);
- ehci_setupUSBDevice(e, j);
- }
- else // Full speed
- {
- writeInfo(0, "Port: %u, full-speed device attached", j+1);
- e->OpRegs->PORTSC[j] |= PSTS_COMPANION_HC_OWNED; // release it to the cHC
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment