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 #269 background imageLoading...
Page #269 background image
Real-Time I/O
Streaming I/O and Device Drivers 7-39
Note that objptr->sync is a counting semaphore and that tasks do not always
block here. The value of objptr->sync represents the number of available
frames on the fromdevice queue.
7.13.2 DEV_ISSUERECLAIM Streaming Model
In the DEV_ISSUERECLAIM streaming model, SIO_issue is used to send
buffers to a stream. To accomplish this, SIO_issue first places the frame on
the device->todevice queue. It then calls Dxx_issue which starts the I/O and
returns.
Dxx_issue calls a low-level hardware function to initialize I/O.
SIO_reclaim is used to retrieve buffers from the stream. This is done by
calling Dxx_reclaim, which blocks until a frame is available on the
device->fromdevice queue. This blocking is accomplished by calling
SEM_pend on the device semaphore objptr->sync, just as for Dxx_issue.
When the device HWI (ISR in Figure 7-9 and Figure 7-10) posts to
objptr->sync, Dxx_reclaim is unblocked, and returns to SIO_reclaim.
SIO_reclaim then gets the frame from the device->fromdevice queue and
returns the buffer. This sequence is shown in Figure 7-9 and Figure 7-10.
Figure 7-9. Placing a Data Buffer to a Stream
Figure 7-10. Retrieving Buffers from a Stream
SIO_issue(outstream,bufp,nbytes,arg)
SIO_reclaim(outstream,&bufp,parg,timeout)
1) Put full bufp on
todevice queue
2) Call Dxx_issue()
1) Call Dxx_reclaim()
2) Get empty bufp from
fromdevice queue
1) Get next buffer from todevice
queue and make "visible" to ISR,
2) If first "issue," enable interrupts
Pend on semaphore until anempty
buffer is available on fromdevice
queue
Application
SIO_module
Dxx_module
SIO_issue(outstream,bufp,nbytes,arg)
SIO_reclaim(outstream,&bufp,parg,timeout)
1) Put empty bufp on
todevice queue
2) Call Dxx_issue()
1) Call Dxx_reclaim()
2) Get full bufp from
fromdevice queue
1) Get next buffer from todevice
queue and make "visible" to ISR,
2) If first "issue," enable interrupts
Pend on semaphore until a full
buffer is available on fromdevice
queue
Application SIO_module
Dxx_module

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