Argox PA-20 Programming Guide Uživatelský manuál Strana 91

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 130
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 90
PT-20 Programming Guide
89
Communication Ports
clear_com
Purpose
Clear receive buffer
Syntax
void clear_com(int port);
Example call
clear_com(1);
Includes
#include “SDK.h ”
Description
This routine is used to clear all data stored in the receive buffer. This can be
used to avoid mis-interpretation when overrun or other error occurred. Use
the argument “port” as the connect port which is chosen to open . You can
choose 1(RS232).
Returns
None
close_com
Purpose
To close specified communication port
Syntax
void close_com(int port);
Example call
close_com(1);
Includes
#include “SDK.h ”
Description
The close_com disables the communication port specified. Use the
argument “port” as the connect port which is chosen to open . You can
choose 1(RS232).
Returns
None
com_cts
Purpose
Get CTS level
Syntax
int close_com(int port);
Example call
if (com_cts(1) = = 0) _printf(“COM 1 CTS is space);
else _printf(“COM 1 CTS is mark”);
Includes
#include “SDK.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(RS232).
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 “SDK.h ”
Zobrazit stránku 90
1 2 ... 86 87 88 89 90 91 92 93 94 95 96 ... 129 130

Komentáře k této Příručce

Žádné komentáře