iPXE
efi_usb.h
Go to the documentation of this file.
1 #ifndef _IPXE_EFI_USB_H
2 #define _IPXE_EFI_USB_H
3 
4 /** @file
5  *
6  * USB I/O protocol
7  *
8  */
9 
10 #include <ipxe/list.h>
11 #include <ipxe/efi/efi.h>
12 #include <ipxe/efi/efi_driver.h>
14 #include <ipxe/usb.h>
15 
16 /** An EFI USB device */
18  /** Name */
19  const char *name;
20  /** The underlying USB function */
21  struct usb_function *func;
22  /** Configuration descriptor */
24  /** Supported languages */
26  /** Length of supported languages */
27  size_t lang_len;
28  /** List of interfaces */
30 };
31 
32 /** An EFI USB device interface */
34  /** Name */
35  char name[32];
36  /** Containing USB device */
38  /** List of interfaces */
39  struct list_head list;
40 
41  /** Interface number */
42  unsigned int interface;
43  /** Alternate setting */
44  unsigned int alternate;
45  /** EFI handle */
47  /** USB I/O protocol */
49  /** Device path */
51 
52  /** Opened endpoints */
54 };
55 
56 /** An EFI USB device endpoint */
58  /** EFI USB device interface */
60  /** USB endpoint */
61  struct usb_endpoint ep;
62 
63  /** Most recent synchronous completion status */
64  int rc;
65 
66  /** Asynchronous timer event */
68  /** Asynchronous callback handler */
70  /** Asynchronous callback context */
71  void *context;
72 };
73 
74 /** Asynchronous transfer fill level
75  *
76  * This is a policy decision.
77  */
78 #define EFI_USB_ASYNC_FILL 2
79 
80 #endif /* _IPXE_EFI_USB_H */
uint16_t * lang
Supported languages.
Definition: efi_usb.h:25
unsigned short uint16_t
Definition: stdint.h:11
size_t lang_len
Length of supported languages.
Definition: efi_usb.h:27
unsigned int alternate
Alternate setting.
Definition: efi_usb.h:44
EFI driver interface.
char name[32]
Name.
Definition: efi_usb.h:35
struct usb_function * func
The underlying USB function.
Definition: efi_usb.h:21
VOID * EFI_EVENT
Handle to an event structure.
Definition: UefiBaseType.h:39
const char * name
Name.
Definition: efi_usb.h:19
EFI_DEVICE_PATH_PROTOCOL * path
Device path.
Definition: efi_usb.h:50
The EFI_USB_IO_PROTOCOL provides four basic transfers types described in the USB 1....
Definition: UsbIo.h:478
This protocol can be used on any device handle to obtain generic path/location information concerning...
Definition: DevicePath.h:45
An EFI USB device.
Definition: efi_usb.h:17
struct efi_usb_endpoint * endpoint[32]
Opened endpoints.
Definition: efi_usb.h:53
A doubly-linked list entry (or list head)
Definition: list.h:18
A USB endpoint.
Definition: usb.h:389
An EFI USB device interface.
Definition: efi_usb.h:33
EFI_EVENT event
Asynchronous timer event.
Definition: efi_usb.h:67
int rc
Most recent synchronous completion status.
Definition: efi_usb.h:64
void * context
Asynchronous callback context.
Definition: efi_usb.h:71
struct list_head interfaces
List of interfaces.
Definition: efi_usb.h:29
struct efi_usb_interface * usbintf
EFI USB device interface.
Definition: efi_usb.h:59
EFI_ASYNC_USB_TRANSFER_CALLBACK callback
Asynchronous callback handler.
Definition: efi_usb.h:69
Linked lists.
unsigned int interface
Interface number.
Definition: efi_usb.h:42
An EFI USB device endpoint.
Definition: efi_usb.h:57
struct usb_configuration_descriptor * config
Configuration descriptor.
Definition: efi_usb.h:23
struct usb_endpoint ep
USB endpoint.
Definition: efi_usb.h:61
EFI API.
EFI Usb I/O Protocol as defined in UEFI specification.
EFI_USB_IO_PROTOCOL usbio
USB I/O protocol.
Definition: efi_usb.h:48
A USB configuration descriptor.
Definition: usb.h:195
struct list_head list
List of interfaces.
Definition: efi_usb.h:39
Universal Serial Bus (USB)
EFI_HANDLE handle
EFI handle.
Definition: efi_usb.h:46
A USB function.
Definition: usb.h:659
struct efi_usb_device * usbdev
Containing USB device.
Definition: efi_usb.h:37
EFI_STATUS(EFIAPI * EFI_ASYNC_USB_TRANSFER_CALLBACK)(IN VOID *Data, IN UINTN DataLength, IN VOID *Context, IN UINT32 Status)
Async USB transfer callback routine.
Definition: UsbIo.h:82
Definition: efi.h:59