Sun Microsystems S16A manual S16awaitfornextbuffer, S16awrite

Page 25

S16A User’s Guide

Input and Output

s16a_wait_for_next_buffer

Description

Blocks until the next buffer is returned from the driver. Returns immediately if a buffer is already complete. The completed buffers are numbered consecutively, so the first call to s16a_wait_for_next_buffer returns the address of buffer 0, the next will be 1, and so on.

Syntax

void *s16a_wait_next_buffer(S16aDev *s16a_p);

Arguments

s16a_p

S16A device handle returned from s16a_open

Return

Address of completed buffer on success; NULL on error. If an error occurs, check the errno global variable for more information.

s16a_write

Description

Perform a write on the S16A. The UNIX 2 GB file offset bug is avoided during large amounts of input or

output; that is, writing past 231 does not fail. This call is not multibuffering, and no transfer is active when it completes.

Syntax

int s16a_write(S16aDev *s16a_p, void *buf, int size);

Arguments

 

s16a_p

S16A device handle returned from s16a_open

buf

address of buffer to write from

size

size of write in bytes

Return

The return value from write; errno is set by write on error.

EDT, Inc. October, 1996

21

Image 25
Contents S16A EDT, Inc. October Contents Tables Overview Installing the Hardware InstallationInstalling the Software Using SunOS VersionS16A User’s Guide Installation Building the Sample Programs Using System V Release 4 Solaris 2.4 or LaterReadme Included FilesElements of S16A Applications Input and OutputRoutine Description DMA Library RoutinesGeneral DMA Library Routines S16A-specific Library Routines S16abufferaddressesSyntax ArgumentsS16acancelcurrent S16acancelS16achecknextbuffer S16aclose Arguments S16aconfigureringbuffersS16agetdaccontrolreg S16adoneS16agetdiodirectionreg S16agetdiodataregS16aopen S16agetoutputbitsS16aserialread S16areadS16aserialwrite S16aserialstrS16asetdaccontrolreg S16asetdefaultsS16asetdiodirectionreg S16asetdiodataregS16astartbuffers S16asetoutputbitsS16awaitforbuffer S16astopbuffersS16awrite S16awaitfornextbufferFoiparityerror Error ConditionsError Codes and Conditions Electrical Interface Hardware InterfaceSignal S16A I/O Description Interface SignalsS16A Interface Signals Pin Signal Connector PinoutConnector Pinout Registers S16A ROM SBus AddressesCurrent DMA Address Registers DMA RegistersNext DMA Address Registers Control and Next Count Registers Current Count RegistersDAC Output Control Register Direct I/O RegistersDIO Direction Register DIO Data RegisterDAC Output Control Register Analog Input Module Internal RegistersName Description Analog Input Module Internal RegistersInput Clock Prescale Registers Input Configuration RegistersInput Gain High Byte Values Trim RegistersTrim Register Use Trim Registers Trim Output Offset RegistersAnalog Input Module Uart Registers Temperature RegisterAnalog Input Module Control Protocol Trim Input Gain RegistersRead from an Input Configuration Register Write to an Input Configuration RegisterWrite to a Clock Prescale Register Read from a Clock Prescale RegisterRead the Temperature Register Uart Command/Status RegisterUart Command/Status Register Write to a Trim RegisterUart Data Register Xilinx Programming RegistersSpecifications References Contacting EDT 15-16 IndexConfiguration ROM