EasyManuals Logo

Texas Instruments TMS320 User Manual

Texas Instruments TMS320
288 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #237 background imageLoading...
Page #237 background image
Stream I/O—Reading and Writing Streams
Streaming I/O and Device Drivers 7-7
7.3 Stream I/O—Reading and Writing Streams
There are two models for streaming data in DSP/BIOS: the standard model
and the Issue/Reclaim model. The standard model provides a simple method
for using streams, while the Issue/Reclaim model provides more control over
the stream operation.
SIO_get and SIO_put implement the standard stream model as shown in
Example 7-3. SIO_get is used to input the data buffers. SIO_get exchanges
buffers with the stream. The bufp parameter is used to pass the device a
buffer and return a different buffer to the application. SIO_get returns the
number of bytes in the input buffer. The SIO_put function performs the output
of data buffers, and, like SIO_get, exchanges physical buffers with the
stream. SIO_put takes the number of bytes in the output buffer
Example 7-3. Inputting and Outputting Data Buffers
Note:
Since the buffer pointed to by bufp is exchanged with the stream, the buffer
size, memory segment, and alignment must correspond to the attributes of
stream.
SIO_issue and SIO_reclaim are the calls that implement the Issue/Reclaim
streaming model as shown in Example 7-4. SIO_issue sends a buffer to a
stream. No buffer is returned, and the stream returns control to the task
without blocking. arg is not interpreted by DSP/BIOS, but is offered as a
service to the stream client. arg is passed to each device with the associated
buffer data. It can be used by the stream client as a method of communicating
with the device drivers. For example, arg could be used to send a time stamp
to an output device, indicating exactly when the data is to be rendered.
SIO_reclaim requests a stream to return a buffer.
Int SIO_get(stream, bufp)
SIO_Handle stream;
Ptr *bufp;
Int SIO_put(stream, bufp, nbytes)
SIO_Handle stream;
Ptr *bufp;
Uns nbytes;

Table of Contents

Other manuals for Texas Instruments TMS320

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320 and is the answer not in the manual?

Texas Instruments TMS320 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320
CategoryComputer Hardware
LanguageEnglish

Related product manuals