X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FUsb2HostController.h;h=84c40a01dc4284f43ecd3d9b1479df1bb338a93d;hb=74fec7085b01caac858ef511056e72b2b9ad5795;hp=b494b3a156fb4c75c3e951c00ce66c7c46261bd9;hpb=1a09f6f6ac691a8dea2e601335d77b652b052404;p=mirror_edk2.git diff --git a/MdePkg/Include/Protocol/Usb2HostController.h b/MdePkg/Include/Protocol/Usb2HostController.h index b494b3a156..84c40a01dc 100644 --- a/MdePkg/Include/Protocol/Usb2HostController.h +++ b/MdePkg/Include/Protocol/Usb2HostController.h @@ -26,9 +26,9 @@ 0x3e745226, 0x9818, 0x45b6, {0xa2, 0xac, 0xd7, 0xcd, 0xe, 0x8b, 0xa2, 0xbc } \ } -// -// Forward reference for pure ANSI compatability -// +/// +/// Forward reference for pure ANSI compatability +/// typedef struct _EFI_USB2_HC_PROTOCOL EFI_USB2_HC_PROTOCOL; @@ -109,8 +109,7 @@ EFI_STATUS OUT UINT8 *MaxSpeed, OUT UINT8 *PortNumber, OUT UINT8 *Is64BitCapable - ) -; + ); #define EFI_USB_HC_RESET_GLOBAL 0x0001 #define EFI_USB_HC_RESET_HOST_CONTROLLER 0x0002 @@ -139,47 +138,41 @@ EFI_STATUS (EFIAPI *EFI_USB2_HC_PROTOCOL_RESET)( IN EFI_USB2_HC_PROTOCOL *This, IN UINT16 Attributes - ) -; + ); /** - - @param EfiUsbHcStateHalt The host controller is in halt - state. No USB transactions can occur - while in this state. The host - controller can enter this state for - three reasons: 1) After host - controller hardware reset. 2) - Explicitly set by software. 3) - Triggered by a fatal error such as - consistency check failure. - - - @param EfiUsbHcStateOperational The host controller is in an - operational state. When in - this state, the host - controller can execute bus - traffic. This state must be - explicitly set to enable the - USB bus traffic. - - - @param EfiUsbHcStateSuspend The host controller is in the - suspend state. No USB - transactions can occur while in - this state. The host controller - enters this state for the - following reasons: 1) Explicitly - set by software. 2) Triggered - when there is no bus traffic for - 3 microseconds. - + Enumration value for status of USB HC. **/ typedef enum { - EfiUsbHcStateHalt, - EfiUsbHcStateOperational, - EfiUsbHcStateSuspend, - EfiUsbHcStateMaximum + EfiUsbHcStateHalt, ///< The host controller is in halt + ///< state. No USB transactions can occur + ///< while in this state. The host + ///< controller can enter this state for + ///< three reasons: 1) After host + ///< controller hardware reset. 2) + ///< Explicitly set by software. 3) + ///< Triggered by a fatal error such as + ///< consistency check failure. + + EfiUsbHcStateOperational, ///< The host controller is in an + ///< operational state. When in + ///< this state, the host + ///< controller can execute bus + ///< traffic. This state must be + ///< explicitly set to enable the + ///< USB bus traffic. + + EfiUsbHcStateSuspend, ///< The host controller is in the + ///< suspend state. No USB + ///< transactions can occur while in + ///< this state. The host controller + ///< enters this state for the + ///< following reasons: 1) Explicitly + ///< set by software. 2) Triggered + ///< when there is no bus traffic for + ///< 3 microseconds. + + EfiUsbHcStateMaximum ///< Maximum value for enumration value of HC status. } EFI_USB_HC_STATE; /** @@ -200,8 +193,7 @@ EFI_STATUS (EFIAPI *EFI_USB2_HC_PROTOCOL_GET_STATE)( IN CONST EFI_USB2_HC_PROTOCOL *This, OUT EFI_USB_HC_STATE *State -) -; +); /** Sets the USB host controller to a specific state. @@ -220,8 +212,7 @@ EFI_STATUS (EFIAPI *EFI_USB2_HC_PROTOCOL_SET_STATE)( IN EFI_USB2_HC_PROTOCOL *This, IN EFI_USB_HC_STATE State - ) -; + ); /** Submits control transfer to a target USB device. @@ -266,8 +257,7 @@ EFI_STATUS IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult - ) -; + ); #define EFI_USB_MAX_BULK_BUFFER_NUM 10 @@ -315,8 +305,7 @@ EFI_STATUS IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult - ) -; + ); /** Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device. @@ -365,8 +354,7 @@ EFI_STATUS IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator OPTIONAL, IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction OPTIONAL, IN VOID *Context OPTIONAL - ) -; + ); /** Submits synchronous interrupt transfer to an interrupt endpoint of a USB device. @@ -412,8 +400,7 @@ EFI_STATUS IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult - ) -; + ); #define EFI_USB_MAX_ISO_BUFFER_NUM 7 #define EFI_USB_MAX_ISO_BUFFER_NUM1 2 @@ -457,8 +444,7 @@ EFI_STATUS IN UINTN DataLength, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult - ) -; + ); /** Submits nonblocking isochronous transfer to an isochronous endpoint of a USB device. @@ -502,8 +488,7 @@ EFI_STATUS IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack, IN VOID *Context OPTIONAL - ) -; + ); /** Retrieves the current status of a USB root hub port. @@ -524,8 +509,7 @@ EFI_STATUS IN CONST EFI_USB2_HC_PROTOCOL *This, IN CONST UINT8 PortNumber, OUT EFI_USB_PORT_STATUS *PortStatus - ) -; + ); /** Sets a feature for the specified root hub port. @@ -546,8 +530,7 @@ EFI_STATUS IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, IN EFI_USB_PORT_FEATURE PortFeature - ) -; + ); /** Clears a feature for the specified root hub port. @@ -568,67 +551,16 @@ EFI_STATUS IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, IN EFI_USB_PORT_FEATURE PortFeature - ) -; - -/** - @par Protocol Description: - The EFI_USB2_HC_PROTOCOL provides USB host controller management, basic - data transactions over a USB bus, and USB root hub access. A device driver - that wishes to manage a USB bus in a system retrieves the EFI_USB2_HC_PROTOCOL - instance that is associated with the USB bus to be managed. A device handle - for a USB host controller will minimally contain an EFI_DEVICE_PATH_PROTOCOL - instance, and an EFI_USB2_HC_PROTOCOL instance. - - @param GetCapability - Retrieves the capabilities of the USB host controller. - - @param Reset - Software reset of USB. - - @param GetState - Retrieves the current state of the USB host controller. - - @param SetState - Sets the USB host controller to a specific state. - - @param ControlTransfer - Submits a control transfer to a target USB device. - - @param BulkTransfer - Submits a bulk transfer to a bulk endpoint of a USB device. - - @param AsyncInterruptTransfer - Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device. - - @param SyncInterruptTransfer - Submits a synchronous interrupt transfer to an interrupt endpoint of a USB device. - - @param IsochronousTransfer - Submits isochronous transfer to an isochronous endpoint of a USB device. - - @param AsyncIsochronousTransfer - Submits nonblocking USB isochronous transfer. - - @param GetRootHubPortStatus - Retrieves the status of the specified root hub port. - - @param SetRootHubPortFeature - Sets the feature for the specified root hub port. - - @param ClearRootHubPortFeature - Clears the feature for the specified root hub port. - - @param MajorRevision - The major revision number of the USB host controller. The revision information - indicates the release of the Universal Serial Bus Specification with which the - host controller is compliant. - - @param MinorRevision - The minor revision number of the USB host controller. The revision information - indicates the release of the Universal Serial Bus Specification with which the - host controller is compliant. -**/ + ); + +/// +/// The EFI_USB2_HC_PROTOCOL provides USB host controller management, basic +/// data transactions over a USB bus, and USB root hub access. A device driver +/// that wishes to manage a USB bus in a system retrieves the EFI_USB2_HC_PROTOCOL +/// instance that is associated with the USB bus to be managed. A device handle +/// for a USB host controller will minimally contain an EFI_DEVICE_PATH_PROTOCOL +/// instance, and an EFI_USB2_HC_PROTOCOL instance. +/// struct _EFI_USB2_HC_PROTOCOL { EFI_USB2_HC_PROTOCOL_GET_CAPABILITY GetCapability; EFI_USB2_HC_PROTOCOL_RESET Reset; @@ -643,7 +575,19 @@ struct _EFI_USB2_HC_PROTOCOL { EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus; EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature; EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature; + + /// + /// The major revision number of the USB host controller. The revision information + /// indicates the release of the Universal Serial Bus Specification with which the + /// host controller is compliant. + /// UINT16 MajorRevision; + + /// + /// The minor revision number of the USB host controller. The revision information + /// indicates the release of the Universal Serial Bus Specification with which the + /// host controller is compliant. + /// UINT16 MinorRevision; };