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 #275 background imageLoading...
Page #275 background image
Device Ready
Streaming I/O and Device Drivers 7-45
SIO_select makes two calls to Dxx_ready for each Dxx device. The first call
is used to register sem with the device, and the second call (with sem =
NULL) is used to un-register sem.
Each Dxx_ready function holds on to sem in its device-specific object (for
example, objptr->ready = sem). When an I/O operation completes (that is, a
buffer has been filled or emptied), and objptr->ready is not NULL, SEM_post
is called to post objptr->ready.
If at least one device is ready, or if SIO_select was called with timeout equal
to 0, SIO_select does not block; otherwise, SIO_select pends on the ready
semaphore until at least one device is ready, or until the time-out has expired.
Consider the case where a device becomes ready before a time-out occurs.
The ready semaphore is posted by whichever device becomes ready first.
SIO_select then calls Dxx_ready again for each device, this time with sem =
NULL. This has two effects. First, any additional Dxx device that becomes
ready will not post the ready semaphore. This prevents devices from posting
to a semaphore that no longer exists, since the ready semaphore is
maintained in the local memory of SIO_select. Second, by polling each
device a second time, SIO_select can determine which devices have become
ready since the first call to Dxx_ready, and set the corresponding bits for
those devices in the ready mask.

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