ReactOS 0.4.17-dev-1037-g720d112
ucx01000.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS USB Host Controller Extension
3 * LICENSE: MIT (https://spdx.org/licenses/MIT)
4 * PURPOSE: Common declarations for ucx01000
5 * COPYRIGHT: Copyright 2026 Justin Miller <justinmiller100@gmail.com>
6 */
7
8#pragma once
9
10#include <ntddk.h>
11#include <windef.h>
12#include <fxldr.h>
13#include <wdf.h>
14#include <ucxclass.h>
15
16#define UCX_POOL_TAG 'xcUR'
17
18#define UCX_CLASS_MAJOR_VERSION 1
19#define UCX_CLASS_MINOR_VERSION 7
20
22
23
27UcxOnClassLoad(VOID);
28
30VOID
32UcxOnClassUnload(VOID);
33
37UcxOnClientBind(
38 _In_ PWDF_CLASS_BIND_INFO ClassBindInfo,
40
42VOID
44UcxOnClientUnbind(
45 _In_ PWDF_CLASS_BIND_INFO ClassBindInfo,
47
52UcxApiIoDeviceControl(
53 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
54 _In_ WDFDEVICE Device,
55 _In_ WDFREQUEST Request,
59
64UcxApiControllerCreate(
65 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
66 _In_ WDFDEVICE Device,
69 _Out_ UCXCONTROLLER *Controller);
70
72VOID
74UcxApiControllerNeedsReset(
75 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
76 _In_ UCXCONTROLLER Controller);
77
79VOID
81UcxApiControllerResetComplete(
82 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
83 _In_ UCXCONTROLLER Controller,
85
87VOID
89UcxApiControllerSetFailed(
90 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
91 _In_ UCXCONTROLLER Controller);
92
97UcxApiRootHubCreate(
98 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
99 _In_ UCXCONTROLLER Controller,
102 _Out_ UCXROOTHUB *RootHub);
103
105VOID
106NTAPI
107UcxApiRootHubPortChanged(
108 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
109 _In_ UCXROOTHUB UcxRootHub);
110
114NTAPI
115UcxApiUsbDeviceCreate(
116 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
117 _In_ UCXCONTROLLER Controller,
120 _Out_ UCXUSBDEVICE *UsbDevice);
121
122VOID
123NTAPI
125 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
127 _In_ PUCX_USBDEVICE_EVENT_CALLBACKS EventCallbacks);
128
130VOID
131NTAPI
132UcxApiUsbDeviceRemoteWakeNotification(
133 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
134 _In_ UCXUSBDEVICE UsbDevice,
136
140NTAPI
141UcxApiEndpointCreate(
142 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
143 _In_ UCXUSBDEVICE UsbDevice,
146 _Out_ UCXENDPOINT *Endpoint);
147
150UCXSSTREAMS
151NTAPI
152UcxApiEndpointGetStaticStreamsReferenced(
153 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
154 _In_ UCXENDPOINT Endpoint,
156
158VOID
159NTAPI
160UcxApiEndpointNeedToCancelTransfers(
161 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
162 _In_ UCXENDPOINT Endpoint);
163
164VOID
165NTAPI
167 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
169 _In_ PUCX_ENDPOINT_EVENT_CALLBACKS EventCallbacks);
170
171VOID
172NTAPI
174 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
177
178VOID
179NTAPI
181 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
182 _In_ UCXENDPOINT Endpoint,
183 _In_ WDFQUEUE WdfQueue);
184
186VOID
187NTAPI
188UcxApiEndpointPurgeComplete(
189 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
190 _In_ UCXENDPOINT Endpoint);
191
193VOID
194NTAPI
195UcxApiEndpointAbortComplete(
196 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
197 _In_ UCXENDPOINT Endpoint);
198
200VOID
201NTAPI
202UcxApiEndpointNoPingResponseError(
203 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
204 _In_ UCXENDPOINT Endpoint);
205
206VOID
207NTAPI
209 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
210 _In_ UCXSSTREAMS StaticStreams,
211 _In_ PSTREAM_INFO StreamInfo);
212
216NTAPI
217UcxApiStaticStreamsCreate(
218 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
219 _In_ UCXENDPOINT Endpoint,
222 _Out_ UCXSSTREAMS *StaticStreams);
223
227NTAPI
228UcxApiInitializeDeviceInit(
229 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
231
234NTAPI
235UcxApiControllerSetIdStrings(
236 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
237 _In_ UCXCONTROLLER Controller,
241
243VOID
244NTAPI
245UcxApiControllerNotifyTransportCharacteristicsChange(
246 _In_ PUCX_DRIVER_GLOBALS DriverGlobals,
247 _In_ UCXCONTROLLER Controller,
unsigned char BOOLEAN
Definition: actypes.h:127
LONG NTSTATUS
Definition: precomp.h:26
_In_ ULONG Attributes
Definition: dispmprt.h:1077
#define _IRQL_requires_max_(irql)
Definition: driverspecs.h:230
#define _IRQL_requires_(irql)
Definition: driverspecs.h:229
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
_Must_inspect_result_ _In_ PUCXHUB_DEVICE_CREATE_INFO _Out_ UCXUSBDEVICE * Device
Definition: hubucx.h:258
_In_ UCXHUB_DEVICE_CONTEXT _In_ UCXENDPOINT Endpoint
Definition: hubucx.h:238
#define _Inout_
Definition: no_sal2.h:162
#define _Must_inspect_result_
Definition: no_sal2.h:62
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#define NTAPI
Definition: typedefs.h:36
uint32_t ULONG
Definition: typedefs.h:59
VOID NTAPI UcxApiDefaultEndpointInitSetEventCallbacks(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _Inout_ PUCXENDPOINT_INIT EndpointInit, _In_ PUCX_DEFAULT_ENDPOINT_EVENT_CALLBACKS EventCallbacks)
Definition: exports.cpp:299
VOID NTAPI UcxApiUsbDeviceInitSetEventCallbacks(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _Inout_ PUCXUSBDEVICE_INIT UsbDeviceInit, _In_ PUCX_USBDEVICE_EVENT_CALLBACKS EventCallbacks)
Definition: exports.cpp:207
WDF_CLASS_LIBRARY_INFO UcxClassLibraryInfo
Definition: ucx01000.h:21
VOID NTAPI UcxApiStaticStreamsSetStreamInfo(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXSSTREAMS StaticStreams, _In_ PSTREAM_INFO StreamInfo)
Definition: exports.cpp:363
_Out_ PWDF_COMPONENT_GLOBALS * ComponentGlobals
Definition: ucx01000.h:39
VOID NTAPI UcxApiEndpointSetWdfIoQueue(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXENDPOINT Endpoint, _In_ WDFQUEUE WdfQueue)
Definition: exports.cpp:312
VOID NTAPI UcxApiEndpointInitSetEventCallbacks(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _Inout_ PUCXENDPOINT_INIT EndpointInit, _In_ PUCX_ENDPOINT_EVENT_CALLBACKS EventCallbacks)
Definition: exports.cpp:286
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
_Must_inspect_result_ _In_ WDFDEVICE _In_ PUCX_CONTROLLER_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ UCXCONTROLLER * Controller
_In_ UCXCONTROLLER _In_ PUCX_CONTROLLER_RESET_COMPLETE_INFO UcxControllerResetCompleteInfo
_In_ UCXCONTROLLER _In_ PUNICODE_STRING ManufacturerNameString
_In_ UCXCONTROLLER _In_ PUNICODE_STRING _In_ PUNICODE_STRING _In_ PUNICODE_STRING ModelNumberString
_In_ UCXCONTROLLER _In_ PUNICODE_STRING _In_ PUNICODE_STRING ModelNameString
_Must_inspect_result_ _In_ WDFDEVICE _In_ PUCX_CONTROLLER_CONFIG Config
_In_ PUCXUSBDEVICE_INFO _In_ PUCXUSBDEVICE_INIT UsbDeviceInit
_In_ PGUID _In_ ULONG OutputBufferLength
Definition: ucxcontroller.h:81
_Out_ PUCX_CONTROLLER_TRANSPORT_CHARACTERISTICS UcxControllerTransportCharacteristics
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFREQUEST Request
_Must_inspect_result_ _In_ UCXUSBDEVICE UsbDevice
Definition: ucxendpoint.h:313
_Must_inspect_result_ _In_ UCXENDPOINT _In_ PVOID Tag
Definition: ucxendpoint.h:325
_Must_inspect_result_ _In_ UCXUSBDEVICE _Inout_ PUCXENDPOINT_INIT * EndpointInit
Definition: ucxendpoint.h:314
WDF_EXTERN_C_START struct _UCX_DRIVER_GLOBALS * PUCX_DRIVER_GLOBALS
struct _UCXENDPOINT_INIT * PUCXENDPOINT_INIT
Definition: ucxobjects.h:20
struct _UCXSSTREAMS_INIT * PUCXSSTREAMS_INIT
Definition: ucxobjects.h:21
struct _UCXUSBDEVICE_INIT * PUCXUSBDEVICE_INIT
Definition: ucxobjects.h:19
_In_ UCXROOTHUB UcxRootHub
Definition: ucxroothub.h:306
_Must_inspect_result_ _In_ UCXCONTROLLER _In_ PUCX_ROOTHUB_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ UCXROOTHUB * RootHub
Definition: ucxroothub.h:299
_Must_inspect_result_ _In_ UCXENDPOINT _Inout_ PUCXSSTREAMS_INIT * StaticStreamsInit
Definition: ucxsstreams.h:53
WDF_EXTERN_C_START struct _STREAM_INFO * PSTREAM_INFO
_Must_inspect_result_ _In_ UCXENDPOINT _Inout_ PUCXSSTREAMS_INIT _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ UCXSSTREAMS * StaticStreams
Definition: ucxsstreams.h:55
_In_ UCXUSBDEVICE _In_ ULONG Interface
Definition: ucxusbdevice.h:428
_In_ PWDFDEVICE_INIT DeviceInit
Definition: wdfcontrol.h:113