UfxDeviceNotifyReset 함수(ufxclient.h)
USB 버스 재설정 이벤트에 대해 UFX에 알 수 있습니다.
구문
void UfxDeviceNotifyReset(
[in] UFXDEVICE UfxDevice,
[in] USB_DEVICE_SPEED DeviceSpeed
);
매개 변수
[in] UfxDevice
UfxDeviceCreate를 호출하여 드라이버가 만든 UFX 디바이스 개체에 대한 핸들입니다.
[in] DeviceSpeed
디바이스의 속도를 나타내는 형식 USB_DEVICE_SPEED 값을 포함합니다.
반환 값
없음
설명
클라이언트 드라이버는 버스 재설정 이벤트를 수신할 때 UfxDeviceNotifyReset 을 호출합니다. 기본이 아닌 모든 엔드포인트를 사용하지 않도록 설정해야 하며 기본 엔드포인트를 다시 설정해야 합니다. 디바이스가 기본 상태로 이동합니다.
클라이언트 드라이버는 일반적으로 EvtInterruptDpc 콜백 함수에서 UfxDeviceNotifyReset을 호출합니다. 다음 예제에서는 초기화 이벤트를 처리하는 방법을 보여 있습니다.
VOID
HandleUsbConnect (
WDFDEVICE WdfDevice
)
/*++
Routine Description:
Handles a connect event from the controller.
Arguments:
WDfDevice - WDFDEVICE object representing the controller.
--*/
{
PCONTROLLER_CONTEXT ControllerContext;
USB_DEVICE_SPEED DeviceSpeed;
TraceEntry();
ControllerContext = DeviceGetControllerContext(WdfDevice);
//
// Read the device speed.
//
//
// #### TODO: Add code to read device speed from the controller ####
//
// Sample will assume SuperSpeed operation for illustration purposes
DeviceSpeed = UsbSuperSpeed;
//
// #### TODO: Add any code needed to configure the controller after connect has occurred ####
//
ControllerContext->Speed = DeviceSpeed;
TraceInformation("Connected Speed is %d!", DeviceSpeed);
//
// Notify UFX about reset, which will take care of updating
// Max Packet Size for EP0 by calling descriptor update.
//
UfxDeviceNotifyReset(ControllerContext->UfxDevice, DeviceSpeed);
ControllerContext->Connect = TRUE;
TraceExit();
}
요구 사항
요구 사항 | 값 |
---|---|
지원되는 최소 클라이언트 | Windows 10 |
대상 플랫폼 | Windows |
헤더 | ufxclient.h |
라이브러리 | ufxstub.lib |
IRQL | DISPATCH_LEVEL |
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기