102
"C" Programming Guide For Optimus S/R
Relevant routines are grouped by different communication types and described separately
in the following sections.
clear_com
Purpose
To clear the receive buffer.
Syntax
void clear_com (int port);
int port; /* COM port whose receive buffer is to be cleared */
Example
clear_com (1); /* clear the receive buffer of COM 1 */
Description
This routine clears all the data stored in the receive buffer. It can be used to
avoid mis-interpretation when overrun or other error occurs.
Return
None
See Also
com_overrun
close_com
Purpose
To terminate communication and disable a specified COM port.
Syntax
int close_com (int port) ;
int port; /* COM port to be closed */
Example
close_com (2); /* close COM 2 */
Description
This routine disables the COM port specified.
Return
It always returns 1.
See Also
open_com
com_eot
Purpose
To check if there is any COM port transmission in progress.
Syntax
int com_eot (int port) ;
int port; /* COM port to be checked */
Example
while (!com_eot (1)); /* wait till prior transmission completed */
write_com (1,”NEXT STRING”);
Description
This routine checks if there is any transmission still in progress. (eot = End Of
Transmission)
Return
If transmission is completed, it returns 1.
Otherwise, it returns 0.
Содержание 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...