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

Page 11
Image 11
Sun Microsystems S16A manual Routine Description, General DMA Library Routines