usbdPipeStatus

Purpose

Obtains pipe status.

Syntax

#include <usbdi.h>
USBstatus usbdPipeStatus(handle, hpipe, status);
USBhandle handle;
USBhandle hpipe;
PPIPESTATUS status;

Parameter

Item Description
handle Handle of open USB logical device that is returned by the USBD_OPEN_DEVICE fp_ioctl.
hpipe Pipe handles returned by the usbdPipeConnect function.
status Address of the PIPESTATUS structure where pipe status is returned.

Description

The USB client driver calls this function to obtain the status of a pipe. The reported state is either USBD_HALTED (unable to accept or process IRPs) or USBD_ACTIVE (able to accept and process IRPs). It also returns the number of IRPs that are pending on the pipe.

This function does not return the status of the pipe from the device perspective (for example: reflected endpoint state). A USB client driver might obtain this status by sending a USB Standard GetStatus device request which refers to the wanted endpoint address to the default control pipe of the USB device.

Execution Environment

This function might be called from the interrupt (USBDINTRLEVEL priority or lower) or process environment.

Return Values

Value Description
USBD_SUCCESS Success
All others Failure