usbdPostIOB

Purpose

Posts transaction complete.

Syntax

#include <hcdi.h>
USBstatus usbdPostIOB(pHCDI, piob)
PHCDI pHCDI;
PIOB piob; 

Parameter

Item Description
pHCDI Pointer to the HCDI structure.
piob Pointer to IOB associated with transaction.

Description

This call vector is started by the adapter driver to retire an IOB. Upon invocation, the driver unmaps the memory area that is associated with the IOB. If the IOB completes successfully and is the last IOB of an IRP transaction, it processes the IRP associated with the IOB and completes the IRP to the caller. If the IOB is completed with an unsuccessful status and is the last IOB of a transaction, the IRP that is associated with the IOB is completed and an unsuccessful status is returned to the client driver and all the IOBs outstanding on the pipe are started for bulk and interrupt endpoints. For control and isochronous endpoints the pipes are put in an unhalted state. If the IOB is completed with an unsuccessful state and is not the last IOB of a transaction, all the remaining IOBs of that transaction are started. It then checks whether the pipe is in halted state. If so, it sets the completion status of IOB to USBD_HALTED. This call can be made from process or interrupt environment.

Execution Environment

This function can be called from the interrupt (HCD_OFFLEVEL priority or lower) or process environment.

Return Values

Value Description
USBD_SUCCESS Success
All others Failure