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 #235 background imageLoading...
Page #235 background image
Creating and Deleting Streams
Streaming I/O and Device Drivers 7-5
7.2 Creating and Deleting Streams
To enable your application to do streaming I/O with a device, the device must
first be added to the configuration. You can add a device for any driver
included in the product distribution or a user-supplied driver. To use a stream
to perform I/O with a device, first configure the device. Then, create the
stream object in the configuration or at runtime with the SIO_create function.
7.2.1 Creating Streams Statically
In the configuration, you can create streams and set the properties for each
stream and for the SIO Manager itself. You cannot use the SIO_delete
function to delete statically-created streams.
7.2.2 Creating and Deleting Streams Dynamically
You can also create a stream at run time with the SIO_create function as
shown in Example 7-1.
Example 7-1. Creating a Stream with SIO_create
SIO_create creates a stream and returns a handle of type SIO_Handle.
SIO_create opens the device(s) specified by name, specifying buffers of size
bufsize. Optional attributes specify the number of buffers, the buffer memory
segment, the streaming model, etc. The mode parameter is used to specify
whether the stream is an input (SIO_INPUT) or output (SIO_OUTPUT)
stream.
Note:
The parameter name must be the same as the name configured for the
device but preceded by a slash character ( / ). For example, for a device
called sine, name should be “/sine.”
SIO_Handle SIO_create(name, mode, bufsize, attrs)
String name;
Int mode;
Uns bufsize;
SIO_Attrs *attrs;

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