Sun Microsystems S16A manual Routine Description, General DMA Library Routines

Page 11

S16A User’s Guide

Input and Output

7.The -ls16aoption to the compiler, to link the library file libs16a.a with your program

See the makefile and example programs provided for examples of compiling code using the library routines.

DMA Library Routines

The DMA library provides a set of consistent routines across many of the EDT products, with simple yet powerful ring-buffered DMA capabilities. Table 1, DMA Library Routines lists the general DMA library routines. In addition, if driver-specific library routines exist, they can be found in a table thereafter.

The sections that follow describe the DMA library routines in alphabetical order.

Routine

Description

 

 

 

 

s16a_open

Opens the S16A for application access.

s16a_close

Terminates access to the S16A and releases resources.

s16a_read

Single, application-level buffer read from the S16A.

s16a_write

Single, application-level buffer write to the S16A.

s16a_set_defaults

Restores the driver and hardware to factory-specified default state.

s16a_configure_ring_buffers

Configures the ring buffers.

s16a_buffer_addresses

Returns addresses of ring buffers.

s16a_wait_for_buffer

Blocks until specified buffers have completed.

s16a_wait_for_next_buffer

Blocks until the next buffer completes.

s16a_check_next_buffer

Checks whether next buffer is complete.

s16a_start_buffers

Begins transfer from or to specified number of buffers.

s16a_cancel

Shuts down the device as soon as possible, optionally resets it.

s16a_cancel_current

Cancels the current DMA, moves pointers to the next.

s16a_stop_buffers

Stops the interface after all buffers have completed.

s16a_done_count

Return absolute (cumulative) number of completed buffers.

foi_parity_error

Checks for parity error since last call.

 

 

 

Table 1. General DMA Library Routines

EDT, Inc. October, 1996

7

Image 11
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 OutputGeneral DMA Library Routines DMA Library RoutinesRoutine Description Arguments S16abufferaddressesS16A-specific Library Routines SyntaxS16achecknextbuffer S16acancelS16acancelcurrent S16aclose Arguments S16aconfigureringbuffersS16agetdaccontrolreg S16adoneS16agetdiodirectionreg S16agetdiodataregS16aopen S16agetoutputbitsS16aserialread S16areadS16aserialwrite S16aserialstrS16asetdaccontrolreg S16asetdefaultsS16asetdiodirectionreg S16asetdiodataregS16astartbuffers S16asetoutputbitsS16awaitforbuffer S16astopbuffersS16awrite S16awaitfornextbufferError Codes and Conditions Error ConditionsFoiparityerror Electrical Interface Hardware InterfaceS16A Interface Signals Interface SignalsSignal S16A I/O Description Connector Pinout Connector PinoutPin Signal Registers S16A ROM SBus AddressesNext DMA Address Registers DMA RegistersCurrent 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