/*
* Usb.c
*
* Created on: 2017年10月11日
* Author:
*/
#include <Uefi.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/Usb2HostController.h>
#include <Library/UefiLib.h>
#include <Library/ShellLib.h>
void FindUsbDev(EFI_STATUS Status, UINTN BufferSize, UINT16 BufferIndex,
UINT16 TableSize, UINT16 LangID, UINT8 StringID, EFI_HANDLE* HandleBuffer,
EFI_USB_IO_PROTOCOL* UsbIo, UINT16* LangIDTable, CHAR16** String) {
EFI_USB_DEVICE_DESCRIPTOR DeviceDescriptor;
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiUsbIoProtocolGuid, NULL,
&BufferSize, &HandleBuffer);
if (EFI_ERROR(Status)) {
Print(L"LocateHandleBuffer fail.\r\n");
}
for (BufferIndex = 0; BufferIndex < BufferSize; BufferIndex++) {
Status = gBS->HandleProtocol(HandleBuffer[BufferIndex],//OpenProtocol?
&gEfiUsbIoProtocolGuid, (void**) &UsbIo
UEFI应用与编程--EFI_USB2_HC_PROTOCOL
最新推荐文章于 2023-05-17 19:59:42 发布