Metrologic Optimus S Programming Manual page 112

"c" programming guide
Table of Contents

Advertisement

106
"C" Programming Guide For Optimus S/R
write_com
Purpose
To send a null-terminated string through a specified COM port.
Syntax
int write_com (int port, char *s);
int port;
char *s;
Example
char s[ ] = {"Hello\n"};
write_com(1,s);
This routine sends a string through a specific COM port. If any prior
Description
transmission is still in progress, it will be terminated and then the current
transmission resumes. The characters of a string will be transmitted one by one
until a NULL character is met. Note that a null string can be used to terminate
the prior transmission.
Return
If successful, it returns the character count.
Otherwise, it returns 0.
See Also
nwrite_com
/* COM port to be used */
/* string to be sent out */
/* send the string "Hello\n" through COM 1 */

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents