Moxa Technologies Moxa Smartio C168H Manuel d'utilisateur Page 69

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 102
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 68
Serial Programming Tools
Smartio C168H/HS User’s Manual 4-11
Syntax for SCO UNIX/OpenServer
#define MSTATUS 0x407
int status; /* status = RS-232 line status */
/* bit0
¡ÐCTS (1:on, 0:off) */
/* bit1
¡ÐDSR (1:on, 0:off) */
/* bit2
¡ÐDCD (1:on, 0:off) */
ioctl(moxa_fd, MSTATUS, &status);
Syntax for UNIX SVR4.2
#define MSTATUS 0x407
#include <sys/stropts.h>
#include <sys/sysmacros.h>
struct strioctl ioc;
int status; /* status = RS-232 line status */
/* bit0
¡ÐCTS (1:on, 0:off) */
/* bit1
¡ÐDSR (1:on, 0:off) */
/* bit2
¡ÐDCD (1:on, 0:off) */
ioc.ic_cmd = MSTATUS;
ioc.ic_timout = 0;
ioc.ic_len = sizeof(int);
ioc.ic_dp = (char *)&status;
ioctl(moxa_fd, I_STR, &ioc);
7. MHWFLOW
This function is used to enable/disable hardware flow control. The first open()
function of a port will set the hardware flow control bits on or off depending on the
[
RTS/CTS Hardware Flow Control] configuration in mxadm. However, users
might want to control the DTR or RTS signal on their will, thus the RTS flow
control bit should be turned off (HWFLowControlOff) in order to take over the
control of DTR or RTS signal via function MTCRTS or MTCDTR. MTCRTS and
MTCDTR can be effective only after the RTS flow control bit of MHWFLOW is
turned off.
Vue de la page 68
1 2 ... 64 65 66 67 68 69 70 71 72 73 74 ... 101 102

Commentaires sur ces manuels

Pas de commentaire