SerCx2SystemDmaTransmitPurgeFifoComplete function (sercx.h)

The SerCx2SystemDmaTransmitPurgeFifoComplete method notifies version 2 of the serial framework extension (SerCx2) that the serial controller driver has finished purging the data from the transmit FIFO in the serial controller hardware.

Syntax

void SerCx2SystemDmaTransmitPurgeFifoComplete(
  [in] SERCX2SYSTEMDMATRANSMIT SystemDmaTransmit,
  [in] ULONG                   BytesPurged
);

Parameters

[in] SystemDmaTransmit

A SERCX2SYSTEMDMATRANSMIT handle to a system-DMA-transmit object. The serial controller driver previously called the SerCx2SystemDmaTransmitCreate method to create this object.

[in] BytesPurged

The number of bytes of unsent data that the serial controller driver purged from the transmit FIFO.

Return value

None

Remarks

SerCx2 calls the EvtSerCx2SystemDmaTransmitPurgeFifo event callback function, if it is implemented, to tell the serial controller driver to terminate the current system-DMA-transmit transaction. SerCx2 previously initiated this transaction in response to a write (IRP_MJ_WRITE) request from a client. For example, SerCx2 might call this function if the client cancels the pending write request, or if the write request times out. For more information, see SerCx2 Handling of Read and Write Requests.

In response to the EvtSerCx2SystemDmaTransmitPurgeFifo call, the driver stops the transfer of data from the write buffer to the transmit FIFO, and discards any previously transferred data that remains in the transmit FIFO. After the purge finishes, the serial controller driver must call SerCx2SystemDmaTransmitPurgeFifoComplete to notify SerCx2. SerCx2 expects this notification and does not complete the write request until it is notified.

The serial controller driver must call SerCx2SystemDmaTransmitPurgeFifoComplete only in response to a call to the EvtSerCx2SystemDmaTransmitPurgeFifo function.

SerCx2 uses the BytesPurged parameter value to determine how many bytes were successfully transmitted before the transmit FIFO was purged. SerCx2 requires this information to complete a write request that times out, or a write request that is canceled after one or more bytes are transmitted.

For more information, see SerCx2 System-DMA-Transmit Transactions.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 8.1.
Target Platform Universal
Header sercx.h
IRQL <= DISPATCH_LEVEL

See also

EvtSerCx2SystemDmaTransmitPurgeFifo

IRP_MJ_WRITE

SERCX2SYSTEMDMATRANSMIT

SERIAL_TIMEOUTS

SerCx2SystemDmaTransmitCreate