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 #229 background imageLoading...
Page #229 background image
Host Channel Manager (HST Module)
Input/Output Methods 6-27
6.6 Host Channel Manager (HST Module)
The HST module manages host channel objects, which allow an application
to stream data between the target and the host. Host channels are configured
for input or output. Input streams read data from the host to the target. Output
streams transfer data from the target to the host.
Note:
HST channel names cannot start with a leading underscore ( _ ).
Each host channel is internally implemented using a pipe object. To use a
particular host channel, the program uses HST_getpipe to get the
corresponding pipe object and then transfers data by calling the PIP_get and
PIP_free operations (for input) or PIP_alloc and PIP_put operations (for
output).
The code for reading data might look like Example 6-5.
Example 6-5 Reading Data Through a Host Channel
Each host channel can specify a data notification function to be performed
when a frame of data for an input channel (or free space for an output
channel) is available. This function is triggered when the host writes or reads
a frame of data.
HST channels treat files as 16- or 32-bit words of raw data, depending on the
platform. The format of the data is application-specific, and you should verify
that the host and the target agree on the data format and ordering. For
extern far HST_Obj input;
readFromHost()
{
PIP_Obj *pipe;
Uns size;
Ptr addr;
pipe = HST_getpipe(&input) /* get a pointer to the host
channel's pipe object */
PIP_get(pipe); /* get a full frame from the
host */
size = PIP_getReaderSize(pipe);
addr = PIP_getReaderAddr(pipe);
' read data from frame '
PIP_free(pipe); /* release empty frame to the host */
}

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