Sun Microsystems S16A manual S16agetoutputbits, S16aopen

Page 18

Input and Output

S16A User’s Guide

s16a_get_output_bits

Description

Get the output resolution of the S16A. Returns 16 or 20, reflecting the current driver setting for the output channel.

Syntax

int s16a_get_output_bits(S16aDev *s16a_p);

Arguments

s16a_p

S16A device handle returned from s16a_open

Return

Returns 16 or 20 on success; returns –1 if the ioctl driver call fails, and sets errno to indicate the problem.

s16a_open

Description

Opens the specified S16A and sets up the device handle.

Syntax

S16aDev *s16a_open(int unit, int channel, int output);

Arguments

 

unit

specifies the device unit number

channel

specifies the analog I/O channel number: 0 or 1

output

specifies the direction: 1 means the output subdevice; 0 means the input subdevice

Return

A handle of type (S16aDev *), or NULL if error. If an error occurs, check the errno global variable for the error number.

14

EDT, Inc. October, 1996

Image 18
Contents S16A EDT, Inc. October Contents Tables Overview Installing the Software InstallationInstalling the Hardware Using SunOS VersionS16A User’s Guide Installation Using System V Release 4 Solaris 2.4 or Later Building the Sample ProgramsIncluded Files ReadmeInput and Output Elements of S16A ApplicationsDMA Library Routines Routine DescriptionGeneral DMA Library Routines Syntax S16abufferaddressesS16A-specific Library Routines ArgumentsS16acancel S16acancelcurrentS16achecknextbuffer S16aclose S16aconfigureringbuffers ArgumentsS16adone S16agetdaccontrolregS16agetdiodatareg S16agetdiodirectionregS16agetoutputbits S16aopenS16aread S16aserialreadS16aserialstr S16aserialwriteS16asetdefaults S16asetdaccontrolregS16asetdiodatareg S16asetdiodirectionregS16asetoutputbits S16astartbuffersS16astopbuffers S16awaitforbufferS16awaitfornextbuffer S16awriteError Conditions FoiparityerrorError Codes and Conditions Hardware Interface Electrical InterfaceInterface Signals Signal S16A I/O DescriptionS16A Interface Signals Connector Pinout Pin SignalConnector Pinout Registers SBus Addresses S16A ROMDMA Registers Current DMA Address RegistersNext DMA Address Registers Current Count Registers Control and Next Count RegistersDIO Direction Register Direct I/O RegistersDAC Output Control Register DIO Data RegisterName Description Analog Input Module Internal RegistersDAC Output Control Register Analog Input Module Internal RegistersInput Configuration Registers Input Clock Prescale RegistersTrim Register Use Trim RegistersInput Gain High Byte Values Trim Registers Trim Output Offset RegistersAnalog Input Module Control Protocol Temperature RegisterAnalog Input Module Uart Registers Trim Input Gain RegistersWrite to a Clock Prescale Register Write to an Input Configuration RegisterRead from an Input Configuration Register Read from a Clock Prescale RegisterUart Command/Status Register Uart Command/Status RegisterRead the Temperature Register Write to a Trim RegisterXilinx Programming Registers Uart Data RegisterSpecifications References Contacting EDT Index 15-16Configuration ROM