Emerson PMT1, PME1 user manual See also getchar, putchar, KBHit, ChangeBaud

Models: PMT1 PME1

1 128
Download 128 pages 13.13 Kb
Page 117
Image 117

Monitor: Standard Monitor Functions

int Baud;

baud_d(Baud)

int Baud;

tx_empty(void)

Description: The serial support functions defined here provide the ability to read, write, and poll the monitor’s serial devices. The monitor initializes and controls two serial devices: the con- sole to provide the user interface and the modem (also known as “download” or “remote” device) to connect to a development system. Each console function has a complement function that performs the same operation on the modem device. The modem device func- tions are prefixed with the letter ‘R’ for remote. Each serial port is configured at reset according to the nonvolatile memory configuration.

The functions get_c and get_d read characters from the console and modem devices. When called, these functions do not return until a character has been received from the serial port. The character read is returned to the calling function.

The functions put_c and put_d write the character c from the console and modem devices. When called, these functions do not return until a character has been accepted by the serial port.

The functions baud_c and baud_d modify the console and modem device baud rates. The argument Baud specifies the new baud rate to use for the port. Because these functions accept any baud rate, care must be taken to request only those baud rates supported by the terminal or host system.

The function tx_empty checks if the transmitter is available for sending a character. If the transmitter is available, TRUE is returned; otherwise, FALSE is returned.

See also: getchar, putchar, KBHit, ChangeBaud.

Strings

CmpStr(Str1, Str2) char *Str1, *Str2;

StrCmp(Str1, Str2) char *Str1, *Str2;

StrCpy(Dest, Source) char *Dest, *Source;

StrLen(Str) char *Str;

StrCat(DestStr, SrcStr) char *DestStr, *SrcStr;

Description: These functions provide the basic string manipulation functions necessary to compare, copy, concatenate, and determine the length of strings.

10002367-02

PmT1 and PmE1 User’s Manual

8-43

Page 117
Image 117
Emerson PMT1, PME1 user manual See also getchar, putchar, KBHit, ChangeBaud