TianoCore EDK2 master
Loading...
Searching...
No Matches
UsbEnumer.h
Go to the documentation of this file.
1
10#ifndef _USB_ENUMERATION_H_
11#define _USB_ENUMERATION_H_
12
13//
14// Advance the byte and bit to the next bit, adjust byte accordingly.
15//
16#define USB_NEXT_BIT(Byte, Bit) \
17 do { \
18 (Bit)++; \
19 if ((Bit) > 7) { \
20 (Byte)++; \
21 (Bit) = 0; \
22 } \
23 } while (0)
24
25//
26// Common interface used by usb bus enumeration process.
27// This interface is defined to mask the difference between
28// the root hub and normal hub. So, bus enumeration code
29// can be shared by both root hub and normal hub
30//
31typedef
33(*USB_HUB_INIT) (
34 IN USB_INTERFACE *UsbIf
35 );
36
37//
38// Get the port status. This function is required to
39// ACK the port change bits although it will return
40// the port changes in PortState. Bus enumeration code
41// doesn't need to ACK the port change bits.
42//
43typedef
45(*USB_HUB_GET_PORT_STATUS) (
46 IN USB_INTERFACE *UsbIf,
47 IN UINT8 Port,
48 OUT EFI_USB_PORT_STATUS *PortState
49 );
50
51typedef
52VOID
53(*USB_HUB_CLEAR_PORT_CHANGE) (
54 IN USB_INTERFACE *HubIf,
55 IN UINT8 Port
56 );
57
58typedef
60(*USB_HUB_SET_PORT_FEATURE) (
61 IN USB_INTERFACE *UsbIf,
62 IN UINT8 Port,
64 );
65
66typedef
68(*USB_HUB_CLEAR_PORT_FEATURE) (
69 IN USB_INTERFACE *UsbIf,
70 IN UINT8 Port,
72 );
73
74typedef
76(*USB_HUB_RESET_PORT) (
77 IN USB_INTERFACE *UsbIf,
78 IN UINT8 Port
79 );
80
81typedef
83(*USB_HUB_RELEASE) (
84 IN USB_INTERFACE *UsbIf
85 );
86
98 IN USB_INTERFACE *UsbIf,
99 IN UINT8 EpAddr
100 );
101
117 IN USB_INTERFACE_DESC *IfDesc,
118 IN UINT8 Alternate
119 );
120
135 IN USB_DEVICE *Device,
136 IN UINT8 ConfigIndex
137 );
138
149 IN USB_DEVICE *Device
150 );
151
162 IN USB_DEVICE *Device
163 );
164
174VOID
175EFIAPI
177 IN EFI_EVENT Event,
178 IN VOID *Context
179 );
180
190VOID
191EFIAPI
193 IN EFI_EVENT Event,
194 IN VOID *Context
195 );
196
197#endif
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_USB_PORT_FEATURE
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
EFI_STATUS UsbRemoveDevice(IN USB_DEVICE *Device)
Definition: UsbEnumer.c:558
EFI_STATUS UsbRemoveConfig(IN USB_DEVICE *Device)
Definition: UsbEnumer.c:509
EFI_STATUS UsbSelectSetting(IN USB_INTERFACE_DESC *IfDesc, IN UINT8 Alternate)
Definition: UsbEnumer.c:311
EFI_STATUS UsbSelectConfig(IN USB_DEVICE *Device, IN UINT8 ConfigIndex)
Definition: UsbEnumer.c:370
USB_ENDPOINT_DESC * UsbGetEndpointDesc(IN USB_INTERFACE *UsbIf, IN UINT8 EpAddr)
Definition: UsbEnumer.c:22
VOID EFIAPI UsbHubEnumeration(IN EFI_EVENT Event, IN VOID *Context)
Definition: UsbEnumer.c:1012
VOID EFIAPI UsbRootHubEnumeration(IN EFI_EVENT Event, IN VOID *Context)
Definition: UsbEnumer.c:1069