Sun Microsystems S16A manual S16aread, S16aserialread

Page 19

S16A User’s Guide

Input and Output

s16a_read

Description

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

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

Syntax

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

Arguments

 

s16a_p

S16A device handle returned from s16a_open

buf

address of buffer to read into

size

size of read in bytes

Return

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

s16a_serial_read

Description

Read a response string from the Analog Input Module.

Syntax

int s16a_serial_read(S16aDev *s16a_p, char *buf, size);

Arguments

 

s16a_p

S16A device struct, returned from s16a_open

buf

Array of characters to receive the response string from the Analog Input Module

size

Number of characters in the buffer

Return

Returns the actual number of bytes transferred; or –1 on ioctl error. Sets errno on failure.

EDT, Inc. October, 1996

15

Image 19
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 OutputRoutine Description DMA Library RoutinesGeneral DMA Library Routines Arguments S16abufferaddressesS16A-specific Library Routines SyntaxS16acancelcurrent 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 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