HP Advanced Communications Controllers (ACC) Guía de usuario Pagina 176

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 328
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 175
ZCOM C I/F Library Routines
ZCNTL (3X)
Chapter 4176
EXAMPLE
#include <zcom/zcomsys.h>
#include <zcom/zcomcall.h>
int32 ierr;
zaddr_type zaddr;
uint32 mode;
uint32 rcode;
zmhd_type zmhd;
char ibuf[size]; /* where size is user-determined; must be >= len */
int32 len;
int32 waitstat;
if (ierr = zcntl (&zaddr, mode, rcode, &zmhd, ibuf, len, &waitstat)) {
/* error return code */
}
else {
/* good return code */
}
/* For request ZCOM_MRQCODE_TERM for i960 card (e.g. Z7300A) */
ztrq2_type ztrq2;
char spec_cfg[6];
ztrq2.tmreqt = 0x80;
/* ... setup other ztrq2 fields and spec_cfg[], max 6 bytes */
memcpy(ibuf, &ztrq2, sizeof(ztrq2));
memcpy(ibuf + sizeof(ztrq2), spec_cfg, 6);
rcode = ZCOM_MRQCODE_TERM;
len = sizeof(ztrq2) + 6;
if (ierr = zcntl (&zaddr, mode, rcode, &zmhd, ibuf, len, &waitstat)) {
/* error return code */
}
else {
/* good return code */
}
FILES
/opt/acc/include/zcom/zcomsys.h ZCOM system general include file,
containing data types, data
structures, constants, error codes,
masks, etc. Note that this must be the
first include file before any other
ZCOM include files.
Vista de pagina 175
1 2 ... 171 172 173 174 175 176 177 178 179 180 181 ... 327 328

Comentarios a estos manuales

Sin comentarios