Input and Output | S16A User’s Guide |
s16a_stop_buffers
Description
Stops DMA transfer after the current buffer has completed, whether DMA is occurring continuously or noncontinuously. If DMA is continuous, also dismantles ring buffer mode and frees the resources it consumed.
Syntax
int s16a_stop_buffers(S16aDev *s16a_p);
Arguments
s16a_p | S16A device handle returned from s16a_open |
Return
0 on success;
s16a_wait_for_buffer
Description
Blocks until the specified buffer is returned from the driver.
Syntax
void *s16a_wait_buffers(S16aDev *s16a_p, int bufnum);
Arguments |
|
s16a_p | S16A device handle returned from s16a_open |
bufnum | buffer number for which to block. Completed buffers are numbered cumulatively starting |
| with 0 when the S16A is opened. (Thus, the allocated buffer number is the transferred |
| buffer number modulo the number of allocated buffers.) |
NOTE: If you wait for all the buffers, the driver is left with none to use when this call returns, and an overrun or underrun will occur.
Return
Address of last completed buffer on success; NULL on error. If an error occurs, check the errno global variable for more information.
20 | EDT, Inc. October, 1996 |