Adi_Dev_Read Functional Description - Analog Devices VisualDSP++ 5.0 Service Manual

Visualdsp++ 5.0 device drivers and system for blackfin processors
Table of Contents

Advertisement

physical driver is then called to shut down the device and to free up any
resources used by the physical device. Lastly, the
ture is flagged as closed so that it may be reused later.

adi_dev_Read Functional Description

The
adi_dev_Read
device with buffers into which inbound data is stored. Assuming error
checking is enabled, processing begins in this function by validating the
device handle and ensuring that the device is open for inbound (or bidi-
rectional) traffic and that the dataflow method is defined. If the dataflow
method is not yet defined, the device manager does not have enough
information to know what to do with the buffer. For detailed reference
information, see
The
parameter passed into the function can point to a single
pBuffer
buffer or a chain of buffers. Furthermore, if the device is supported by
peripheral DMA, the reserved area within the buffer data structure must
be configured appropriately. All of these details are taken care of in the
PrepareBufferList
for more information on this function).
Once the buffer list is prepared, a check is made to see whether the device
is supported by peripheral DMA. If so, the DMA manager is called to
queue the buffers on the proper DMA channel using the appropriate data-
flow method—chained descriptors are passed to the DMA manager via the
adi_dma_Queue
function. If peripheral DMA is not supported, the buffers are
Buffer
passed directly to the physical driver using the
Note that when a device is supported by peripheral DMA, the physical
driver is extremely simple because the device manager handles all data
buffers for the physical device.
Lastly, a check is made to see if the device is operating in synchronous or
asynchronous mode. If it is operating in asynchronous mode, the
function returns to the application immediately. If it is
dev_Read
VisualDSP++ 5.0 Device Drivers and System
Services Manual for Blackfin Processors
function is called by the application to provide the
"adi_dev_Read" on page
static function (see
function, and circular buffers passed via the
Device Driver Manager
ADI_DEV_DEVICE
10-63.
"PrepareBufferList" on page 10-43
adi_pdd_Read
struc-
adi_dma_
function.
adi_
10-37

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VisualDSP++ 5.0 and is the answer not in the manual?

Questions and answers

Table of Contents