Moxa Technologies INTELLIO C218 Manual de usuario Pagina 75

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 122
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 74
Serial Programming Tools
Intellio C320Turbo User's Manual 4-7
#include <sys/sysmacros.h>
#define MOBUFED 0x402
struct strioctl ioc;
int count; /* number of bytes queued in the output buffer */
ioc.ic_cmd = MOBUFED;
ioc.ic_timout = 0;
ioc.ic_len = sizeof(int);
ioc.ic_dp = (char *)&count;
ioctl(moxa_fd, I_STR, &ioc);
Note: See MIBUFED for influence of STREAMS driver.
3. MTCRTS
This function, only valid when hardware flow control is turned off (see
MHWFLOW), is used to turn RTS on or off.
Syntax for SCO UNIX/XENIX
#define MTCRTS 0x403
#define TurnON 1
#define TurnOFF 0
ioctl(moxa_fd, MTCRTS, TurnON);
ioctl(moxa_fd, MTCRTS, TurnOFF);
Syntax for SVR4.x UNIX/Solaris x86
#include <sys/stropts.h>
#include <sys/sysmacros.h>
#define MTCRTS 0x403
#define TurnON 1
#define TurnOFF 0
struct strioctl ioc;
int setting;
setting = TurnON /* or TurnOFF */;
ioc.ic_cmd = MTCRTS;
ioc.ic_timout = 0;
ioc.ic_len = sizeof(int);
ioc.ic_dp = (char *)&setting;
ioctl(moxa_fd, I_STR, &ioc);
4. MTCDTR
Vista de pagina 74
1 2 ... 70 71 72 73 74 75 76 77 78 79 80 ... 121 122

Comentarios a estos manuales

Sin comentarios