S16A User’s Guide | Input and Output |
s16a_configure_ring_buffers
Description
Configures the SBus
Buffers can be allocated and maintained within the SBus
Syntax
int s16a_configure_ring_buffers(S16aDev *s16a_p, int bufsize, int nbufs, void *bufarray[], int data_output);
Arguments |
|
|
s16a_p | S16A device handle returned from s16a_open | |
bufsize | size of each buffer. For optimal efficiency, allocate a value approximating throughput | |
| divided by 20: that is, if transfer occurs at 20 MB per second, allocate 1 MB per buffer. | |
| Buffers significantly larger or smaller can overuse memory or lock the system up in | |
| processing interrupts. | |
nbufs | number of buffers. Must be 1 or greater. Four is recommended. | |
bufarray | array of pointers to individual buffers if the buffers are allocated by the application. Must | |
| be NULL if in library, or have nbufs elements. | |
| library | Must be NULL. |
| user | This array must be filled with the addresses of the buffers allocated by |
|
| the application for the library to use. |
data_direction | Indicates whether this connection is to be used for input or output. Only one direction is | |
| possible per device or subdevice: | |
| EDT_READ = 0 | |
| EDT_WRITE = 1 |
Return
0 on success;
EDT, Inc. October, 1996 | 11 |