Sun Microsystems S16A manual S16aconfigureringbuffers, Arguments

Page 15

S16A User’s Guide

Input and Output

s16a_configure_ring_buffers

Description

Configures the SBus 16-bit Dual Analog Interface ring buffers. Any previous configuration is replaced, and previously allocated buffers are released.

Buffers can be allocated and maintained within the SBus 16-bit Dual Analog Interface library or within the user application itself.

Syntax

int s16a_configure_ring_buffers(S16aDev *s16a_p, int bufsize, int nbufs, void *bufarray[], int data_output);

Arguments

 

 

s16a_p

S16A device handle returned from s16a_open

bufsize

size of each buffer. For optimal efficiency, allocate a value approximating throughput

 

divided by 20: that is, if transfer occurs at 20 MB per second, allocate 1 MB per buffer.

 

Buffers significantly larger or smaller can overuse memory or lock the system up in

 

processing interrupts.

nbufs

number of buffers. Must be 1 or greater. Four is recommended.

bufarray

array of pointers to individual buffers if the buffers are allocated by the application. Must

 

be NULL if in library, or have nbufs elements.

 

library

Must be NULL.

 

user

This array must be filled with the addresses of the buffers allocated by

 

 

the application for the library to use.

data_direction

Indicates whether this connection is to be used for input or output. Only one direction is

 

possible per device or subdevice:

 

EDT_READ = 0

 

EDT_WRITE = 1

Return

0 on success; –1 on error. If all buffers cannot be allocated, none are allocated and an error is returned.

EDT, Inc. October, 1996

11

Image 15
Contents S16A EDT, Inc. October Contents Tables Overview Using SunOS Version InstallationInstalling the Hardware Installing the SoftwareS16A 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 OutputDMA Library Routines Routine DescriptionGeneral DMA Library Routines Arguments S16abufferaddressesS16A-specific Library Routines SyntaxS16acancel S16acancelcurrentS16achecknextbuffer S16aclose Arguments S16aconfigureringbuffersS16agetdaccontrolreg S16adoneS16agetdiodirectionreg S16agetdiodataregS16aopen S16agetoutputbitsS16aserialread S16areadS16aserialwrite S16aserialstrS16asetdaccontrolreg S16asetdefaultsS16asetdiodirectionreg S16asetdiodataregS16astartbuffers S16asetoutputbitsS16awaitforbuffer S16astopbuffersS16awrite S16awaitfornextbufferError Conditions FoiparityerrorError Codes and Conditions Electrical Interface Hardware InterfaceInterface Signals Signal S16A I/O DescriptionS16A Interface Signals Connector Pinout Pin SignalConnector Pinout Registers S16A ROM SBus AddressesDMA Registers Current DMA Address RegistersNext DMA Address Registers Control and Next Count Registers Current Count RegistersDIO Data Register Direct I/O RegistersDAC Output Control Register DIO Direction RegisterAnalog Input Module Internal Registers Analog Input Module Internal RegistersDAC Output Control Register Name DescriptionInput Clock Prescale Registers Input Configuration RegistersTrim Registers Trim Output Offset Registers Trim RegistersInput Gain High Byte Values Trim Register UseTrim Input Gain Registers Temperature RegisterAnalog Input Module Uart Registers Analog Input Module Control ProtocolRead from a Clock Prescale Register Write to an Input Configuration RegisterRead from an Input Configuration Register Write to a Clock Prescale RegisterWrite to a Trim Register Uart Command/Status RegisterRead the Temperature Register Uart Command/Status RegisterUart Data Register Xilinx Programming RegistersSpecifications References Contacting EDT 15-16 IndexConfiguration ROM