Sun Microsystems S16A manual S16asetdaccontrolreg, S16asetdefaults

Page 21

S16A User’s Guide

Input and Output

s16a_set_dac_control_reg

Description

Write a specified value to the output DAC Control register.

Syntax

int s16a_set_dac_control_reg(S16aDev *s16a_p, int value);

Arguments

 

s16a_p

S16A device handle returned from s16a_open

value

Value to write to the DAC Control register.

Return

Returns 0 on success or –1 on failure. Fails if s16a_p does not refer to an output channel. Sets errno on failure.

s16a_set_defaults

Description

Resets the S16A configuration to its default state:

The Xilinx Programming registers are set to S16A_XRESET and then cleared.

The UART Command/Status register and the DAC Output Control register are set to 0.

Gain and offset values are set from /dev/s16a.cfg, which is generated when you run s16acalibrate.

Ring buffer mode is disabled and driver- or library-allocated ring buffers are released.

Syntax

int s16a_set_defaults(S16aDev *s16a_p);

Arguments

s16a_p

S16A device handle returned from s16a_open

Return

Return value from ioctl call to driver: 0 on success; –1 on error. If an error occurs, check the errno global variable for the error number.

EDT, Inc. October, 1996

17

Image 21
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 OutputDMA Library Routines Routine DescriptionGeneral DMA Library Routines S16A-specific Library Routines S16abufferaddressesSyntax ArgumentsS16acancel 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 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