mirror of
https://github.com/reactos/reactos.git
synced 2025-07-08 09:37:56 +00:00
[USBEHCI_NEW]
hub_controller: - Implement StatusChangeEndpointCallBack called by HardwareDevice class when port status has changed on controller. - Move Status Change Endpoint query code to IQueryStatusChageEndpoint as it is also needed by StatusChangeEndpointCallBack. usb_request: - Implement InternalCreateUsbRequest. usb_queue: - Implement CreateUsbRequest and AddUsbRequest hardware: - Implement GetAsyncListRegister and GetPeriodicListRegister. - Implement SetStatusChangeEndpointCallBack for setting callback and context. Call the callback when a port status changes. - Initialize the UsbQueue after creating the AsyncQueueHead, as the UsbQueue calls will call back with GetAsyncListRegister. svn path=/branches/usb-bringup/; revision=51407
This commit is contained in:
parent
d4f7a44a18
commit
4dff45da57
6 changed files with 243 additions and 56 deletions
|
@ -934,4 +934,38 @@ CUSBRequest::ShouldReleaseRequestAfterCompletion()
|
|||
//
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
InternalCreateUSBRequest(
|
||||
PUSBREQUEST *OutRequest)
|
||||
{
|
||||
PUSBREQUEST This;
|
||||
|
||||
//
|
||||
// allocate requests
|
||||
//
|
||||
This = new(NonPagedPool, TAG_USBEHCI) CUSBRequest(0);
|
||||
if (!This)
|
||||
{
|
||||
//
|
||||
// failed to allocate
|
||||
//
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
|
||||
//
|
||||
// add reference count
|
||||
//
|
||||
This->AddRef();
|
||||
|
||||
//
|
||||
// return result
|
||||
//
|
||||
*OutRequest = (PUSBREQUEST)This;
|
||||
|
||||
//
|
||||
// done
|
||||
//
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue