
HST_getpipe
Application Program Interface
2-147
Important Note:
This API is being deprecated and will no longer be
supported in the next major release of DSP/BIOS. The HST module is
still supported in DSP/BIOS 5.32 and will be supported in any patch
releases or minor enhancements to DSP/BIOS 5.32.
C Interface
Syntax
pipe = HST_getpipe(hst);
Parameters
HST_Handle hst
/* host object handle */
Return Value
PIP_Handle pip
/* pipe object handle*/
Reentrant
yes
Description
HST_getpipe gets the address of the pipe object for the specified host
channel object.
Example
Void copy(HST_Obj *input, HST_Obj *output)
{
PIP_Obj *in, *out;
Uns *src, *dst;
Uns size;
in = HST_getpipe(input);
out = HST_getpipe(output);
if (PIP_getReaderNumFrames == 0 ||
PIP_getWriterNumFrames == 0) {
error;
}
/* get input data and allocate output frame */
PIP_get(in);
PIP_alloc(out);
/* copy input data to output frame */
src = PIP_getReaderAddr(in);
dst = PIP_getWriterAddr(out);
size = PIP_getReaderSize();
out->writerSize = size;
for (; size > 0; size--) {
*dst++ = *src++;
}
/* output copied data and free input frame */
PIP_put(out);
PIP_free(in);
}
See Also
HST_getpipe
Get corresponding pipe object