MdeModulePkg EhciDxe: Extract new EhciInsertAsyncIntTransfer function
V3: Match function parameter name and description between EhciSched.c and EhciSched.h. V2: Add the missing "gBS->FreePool (Data);". REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1274 Extract new EhciInsertAsyncIntTransfer function from EhcAsyncInterruptTransfer. It is code preparation for following patch, no essential functional change. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
This file contains the definination for host controller schedule routines.
|
||||
|
||||
Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -162,6 +162,39 @@ EhciDelAllAsyncIntTransfers (
|
||||
IN USB2_HC_DEV *Ehc
|
||||
);
|
||||
|
||||
/**
|
||||
Insert a single asynchronous interrupt transfer for
|
||||
the device and endpoint.
|
||||
|
||||
@param Ehc The EHCI device.
|
||||
@param DevAddr The device address.
|
||||
@param EpAddr Endpoint addrress & its direction.
|
||||
@param DevSpeed The device speed.
|
||||
@param Toggle Initial data toggle to use.
|
||||
@param MaxPacket The max packet length of the endpoint.
|
||||
@param Hub The transaction translator to use.
|
||||
@param DataLen The length of data buffer.
|
||||
@param Callback The function to call when data is transferred.
|
||||
@param Context The context to the callback.
|
||||
@param Interval The interval for interrupt transfer.
|
||||
|
||||
@return Created URB or NULL.
|
||||
|
||||
**/
|
||||
URB *
|
||||
EhciInsertAsyncIntTransfer (
|
||||
IN USB2_HC_DEV *Ehc,
|
||||
IN UINT8 DevAddr,
|
||||
IN UINT8 EpAddr,
|
||||
IN UINT8 DevSpeed,
|
||||
IN UINT8 Toggle,
|
||||
IN UINTN MaxPacket,
|
||||
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Hub,
|
||||
IN UINTN DataLen,
|
||||
IN EFI_ASYNC_USB_TRANSFER_CALLBACK Callback,
|
||||
IN VOID *Context,
|
||||
IN UINTN Interval
|
||||
);
|
||||
|
||||
/**
|
||||
Interrupt transfer periodic check handler.
|
||||
|
Reference in New Issue
Block a user