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 */
}
Summary of Contents for TMS320 Series
Page 1: ...TMS320 DSP BIOS v5 40 User s Guide Literature Number SPRU423G April 2009 ...
Page 16: ...xvi ...
Page 152: ...Tasks 4 48 Figure 4 12 Trace from Example 4 7 ...
Page 168: ...Semaphores 4 64 Figure 4 14 Trace Results from Example 4 11 ...
Page 202: ...5 20 ...
Page 287: ...Index 9 Index Void 1 11 W words data memory 3 15 of code 1 5 wrapper function 2 29 ...
Page 288: ...Index 10 Index ...