
Chapter 3 Terminal Specific Function Library
103
com_overrun
Purpose
To check if overrun error occurs.
Syntax
int com_overrun (int port);
int port; /* which COM port (1 or 2) to be checked */
Example
if (overrun (1) > 0) clear_com (1);
/* if overrun, data stored in the buffer is not complete, clear them all */
Description
This routine checks if overrun error occurs on COM 1 or COM 2.
Return
If overrun occurs, it returns 1.
Otherwise, it returns 0.
See Also
clear_com
nwrite_com
Purpose
To send a specific number of characters through a specified COM port.
Syntax
int nwrite_com (int port, char *s, int count);
int port; /* COM port to be used */
char *s; /* string to be sent out */
int count; /* number of characters to be sent */
Example
char s[] = {"Hello\n"};
nwrite_com (1,s,2); /* send the characters "He" through COM 1 */
Description
This routine sends the characters of a string one by one until the specified
number of characters are sent out.
Return
If successful, it returns the character count.
Otherwise, it returns 0.
See Also
write_com
open_com
Purpose
To enable a specified COM port and initialize communication.
Syntax
int open_com (int com_port, int setting);
int com_port; /* COM port to be opened */
int setting; /* port settings for COM 1 or COM 2 as shown below */
Содержание Optimus R
Страница 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Страница 6: ......
Страница 8: ...2 C Programming Guide For Optimus S R...
Страница 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Страница 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Страница 24: ...18 C Programming Guide For Optimus S R...
Страница 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...
Страница 232: ...226 C Programming Guide For Optimus S R 4 11 Implementation defined Limits limits h float h Refer to limit h and float h...
Страница 238: ...232 C Programming Guide For Optimus S R...