Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ipushfifo(3) — HP-UX Instrument Control Library C.03.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ipeek(3)

ipoke(3)

iblockcopy(3)

igeterrno(3)

igeterrstr(3)

imap(3)

IPUSHFIFO/IPOPFIFO(3)

HP-UX

NAME

ibpushfifo, iwpushfifo, ilpushfifo, ibpopfifo, iwpopfifo, ilpopfifo

SYNOPSIS

 #include <sicl.h>
 int ibpushfifo (id,src,fifo,cnt); /* Byte Push */
 INST id;
 unsigned char *src;
 unsigned char *fifo;
 unsigned long cnt;
 
 int iwpushfifo (id,src,fifo,cnt,swap); /* Word Push */
 INST id;
 unsigned short *src;
 unsigned short *fifo;
 unsigned long cnt;
 int swap;
 
 int ilpushfifo (id,src,fifo,cnt,swap); /* Longword Push */
 INST id;
 unsigned long *src;
 unsigned long *fifo;
 unsigned long cnt;
 int swap;
 
 int ibpopfifo (id,fifo,dest,cnt); /* Byte Pop */
 INST id;
 unsigned char *fifo;
 unsigned char *dest;
 unsigned long cnt;
 
 int iwpopfifo (id,fifo,dest,cnt,swap); /* Word Pop */
 INST id;
 unsigned short *fifo;
 unsigned short *dest;
 unsigned long cnt;
 int swap;
 
 int ilpopfifo (id,fifo,dest,cnt,swap); /* Longword Pop */
 INST id;
 unsigned long *fifo;
 unsigned long *dest;
 unsigned long cnt;
 int swap;
 

DESCRIPTION

ibpushfifo, iwpushfifo, and ilpushfifo will read data from memory located at *src (and incremented to the next char/short/long with each read) and write this data successively into the single memory location *fifo (no incrementing of the destination address is performed).  In other words, *src is incremented for each element while *fifo is not.  This allows writing values into a single fifo register pointed to by *fifo. The id parameter is an INST id for a valid session.  This parameter is normally ignored by these routines, however, these routines may use this parameter to identify which interface is being used and perform the transfer using an interface-specific mechanism (such as DMA).  If this functionality is not desired, the user may pass 0 for the id parameter. 
 
ibpopfifo, iwpopfifo, and ilpopfifo are identical to the i*pushfifo routines, except memory elements are read successively from the single memory location *fifo (no incrementing is performed) and are written to memory elements starting at *dest (and incremented to the next char/short/long with each write).  In other words, *dest is incremented for each element while *fifo is not.  This allows reading values from a single fifo register pointed to by *fifo. 
 
The iwpushfifo, ilpushfifo, iwpopfifo, and ilpopfifo routines are also passed a swap parameter.  If swap is zero, then no byte swapping is performed.  If it is non-zero, then byte swapping (if necessary) is performed to change byte ordering from the internal format of the computer to/from VXI (MOTOROLA) byte ordering. 
 
The src and dest parameters must be properly aligned for the appropriate data transfer.  For iwpushfifo and iwpopfifo, these address parameters must be word aligned.  For ilpushfifo and ilpopfifo, these address parameters must be longword aligned. 
 
Note:  If a buserror occurs, unexpected results may occur. 
 

RETURN VALUE

These routines will return 0 on success, or a non-zero error code otherwise. 

ERRORS

These routines fail under the following circumstances, and set the return value to one of the following:

­[I_ERR_BADID] The INST id is invalid. 

­[I_ERR_PARAM] An invalid parameter was specified. 
 

SEE ALSO

ipeek(3), ipoke(3), iblockcopy(3), igeterrno(3), igeterrstr(3), imap(3)

AUTHOR

ibpushfifo, iwpushfifo, ilpushfifo, ibpopfifo, iwpopfifo, and ilpopfifo were developed by HP. 
 

Hewlett-Packard Company  —  May 05, 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026