COMM-DRV/Lib: GetPaceTime() Get the current inter-character pace time

Description-

Get the current inter-character pace time. The time retrieved is in timer tics. The timer tic resolution is set with the CdrvSetTimerResolution() function.

Syntax-

pacetime = GetPaceTime(port);

On Entry-

int port;

Port previously opened with OpenComPort().

On Exit-

unsigned int pacetime;

The current pacetime in timer tics.

else

0xffff If port was not initialized.

See Also-

CdrvSetTimerResolution()
SetPaceTime()

Example-

#include “comm.h”

unsigned int oldpacetime;
unsigned int newpacetime=1;
int                   port=0;

/* Save old pace time */
if ((oldpacetime=GetPaceTime(port)) == -1)
{
printf(“Port not initialized\n”);

/* Take remedial action */
}

/* Set a new pace time */
SetPaceTime(port,newpacetime);

:
:

/* Restore the old pace time */
SetPaceTime(port,oldpacetime);