ProSoft Technology MVI69-ADM User Manual

Page 264

Advertising
background image

Serial Port Library Functions

MVI-ADM ♦ 'C' Programmable

Developer's Guide

'C' Programmable Application Development Module

Page 264 of 342

ProSoft Technology, Inc.

February 20, 2013

MVIsp_PurgeDataUnread

Syntax

int MVIsp_PurgeDataUnread(int comport)

Parameters

comport

port whose receive data is to be purged

Description
MVIsp_PurgeDataUnread deletes all data waiting in the receive queue. The data
is discarded and is no longer available for reading.

Note: If handshaking is enabled and the transmitting serial device has been paused, this function
will release the transmitting serial device to resume transmission.

MVI46 and MVI56 only.

Return Value

MVI_SUCCESS

the data was purged successfully

MVI_ERR_BADPARAM

invalid comport

MVI_ERR_NOACCESS

the comport has not been opened

Example

if (MVIsp_PurgeDataUnread(COM1) == MVI_SUCCESS)
printf("Transmit Data purged.\n");

See Also
MVIsp_PurgeDataUnsent (page 263)

Advertising