INtime SDK Help
TransmitCommChar (Serial Communications)
INtime SDK v6 > About INtime > Networking and I/O > Serial Communications (COMM) > TransmitCommChar (Serial Communications)

Transmits a specified character ahead of any pending data in the output buffer of the specified communications device

BOOLEAN TransmitCommChar(
  COMMHANDLE hComm,  // handle to communications device
  char cChar         // character to transmit
);

Parameters

hComm
[in] Handle to the communications device. OpenComm returns this handle.
cChar
[in] Specifies the character to be transmitted.

Return Values

Non-zero
Success.
0 (zero)
Failure. To determine the status, call GetLastRtError.

Status

E_BUSY
A write operation is already in progress.
E_DISCONNECTED
COMM channel is closed.
E_IO
A hardware error occurred.
E_LIMIT
Previous TransmitCommChar has not completed.
E_PARAM
Invalid parameter.

Remarks

This function is useful for sending an interrupt character (such as a CTRL+C) to a host system.

If the device is not transmitting, TransmitCommChar cannot be called repeatedly. Once TransmitCommChar places a character in the output buffer, the character must be transmitted before the function can be called again. If the previous character is not yet sent, TransmitCommChar returns an error.

Requirements

Versions Defined in Include Link to
INtime 3.1 intime/rt/include/comm.h comm.h comm.lib
See Also