
96
Example call
:
if (com_cts(1) = = 0) _printf(“COM 1 CTS is space);
else _printf(“COM 1 CTS is mark”);
Includes
:
#include “LIB_CL.h ”
Description
:
This routine is used to check current CTS level. Use the argument
“port” as the connect port which is chosen to open. Now we only can
choose 1(COM 1).
Returns
:
1 : allow to deliver
0 : not allow to deliver
com_eot
Purpose
:
To see if any COM port transmission in process (End Of Transmission)
Syntax
:
int com_eot(int port);
Example call
:
while (com_eot(1) != 0x00); write_com(1,”NEXT STRING”);
Includes
:
#include “LIB_CL.h ”
Description
:
This routine is used to check if prior transmission is still in process or
not. Use the argument “port” as the connect port which is chosen to
open . Now we only can choose 1(COM 1).
Returns
:
0, prior transmission still in course
1, transmission completed
-1, the transmitting port choices error
com_overrun
Purpose
:
See if overrun error occurred
Syntax
:
int com_overrun(int port);
Example call
:
if (com_overrun(1) > 0) clear_com(1);
Includes
:
#include “LIB_CL.h ”
Description
:
This routine is used to see if overrun met. The overrun flag is
automatically cleared after examined. Only can choice “1” now
(COM 1)
。
Returns
:
1, overrun error met
0, OK
-1, the transmitting port choices error
com_rts
Purpose
:
Set RTS signal
Syntax
:
void com_rts(int port, int val);
Example call
:
com_rts(1,1);
Includes
:
#include “LIB_CL.h ”
Description
:
This routine is used to control the RTS signal. It works even when the
CTS flow control is selected. However, RTS might be changed by the
background routine according to receiving buffer status. It is strongly
Содержание PT-10
Страница 4: ...3 Keyboard Wedge 99 System 101 Power 102 Other 102 ...
Страница 13: ...12 6 Development Flow Chart ...
Страница 53: ...52 Returns No returns Notes ...