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 #241 background imageLoading...
Page #241 background image
Stream I/O—Reading and Writing Streams
Streaming I/O and Device Drivers 7-11
Example 7.5. Basic SIO Function (continued)
* ======== doStreaming ========
* This function is the body of the pre-created TSK thread
* streamTask.
*/
Void doStreaming(Uns nloops)
{
Int i, j, nbytes;
Int *buf;
status = SIO_staticbuf(input, (Ptr *)&buf);
if (status ! = SYS_ok) {
SYS_abort(“could not acquire static frame:);
}
for (i = 0; i < nloops; i++) {
if ((nbytes = SIO_get(input, (Ptr *)&buf)) < 0) {
SYS_abort("Error reading buffer %d", i);
}
LOG_printf(&trace, "Read %d bytes\nBuffer %d data:",
nbytes, i);
for (j = 0; j < nbytes / sizeof(Int); j++) {
LOG_printf(&trace, "%d", buf[j]);
}
}
LOG_printf(&trace, "End SIO example #1");
}

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