beautypg.com

Comtrol API (6508) for the MS-DOS User Manual

Page 33

background image

33

API Functions

aaSetCloseDelay

aaSetCloseDelay

Sets the maximum time aaClose() waits for a device’s
transmit buffer to drain before flushing the transmit
buffer and completing the close.

aaSetCloseDelay(Dev,MaxDelay)
int Dev

Device number

int MaxDelay

Maximum time aaClose will

wait for a device’s transmit
buffer to drain in seconds. For
no delay use 0. Maximum value
is 32,767 seconds.

int:

NO_ERR

if successful.

ERR_DEV

if device number out of range.

The device does not need to be open to execute this
function.

Function

Purpose

Call

Return

Comments

aaWrite

Writes serial data out a device.

aaWrite(Dev,Cnt,Buf)
int Dev
:

Device number

int Cnt:

Number of bytes to be
written

unsigned char *Buf:

Buffer of data to write

int: Number of bytes written

if successful

0

if no data bytes written

ERR_DEV

if dev number out of

range
ERR_NOTOPEN

if dev not open for

transmit

The Cnt parameter should not be greater than the size
of the Buf transmit buffer.

Function

Purpose

Call

Return

Warning