Analog Devices VisualDSP++ 5.0 Service Manual page 452

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

Advertisement

Physical Driver Design
peripheral DMA still need to provide this function but should simply
return
ADI_DEV_RESULT_NOT_SUPPORTED
called.
For devices that are not supported by peripheral DMA, the
function is passed one or more buffers that the application has provided
for inbound data reception. The physical driver can choose to process the
buffers immediately, or provide the logic and functionality to queue or
somehow stage these buffers for use at a time. However, the physical
driver is required to process the buffers in the order in which they were
received.
For some devices, it may not be possible or practical to completely fill a
buffer with data. For example, consider an Ethernet driver. The Ethernet
driver typically receives packets that vary in length. The application may
know what the maximum size Ethernet packet is and provide the driver
with buffers sized to the maximum packet size. The driver may then
receive a packet from the network that is smaller than the maximum
packet size. It would be impractical for the physical driver to wait until
additional packets were received and completely fill the buffer before pro-
cessing. So, it is the physical driver's option to decide when to consider a
buffer fully processed. Each buffer has a processed flag and processed size
flag that the physical driver sets, based on when it considers a buffer pro-
cessed and how much valid data the buffer contains.
Also, any buffer can be flagged by the application for notification when
the buffer has completed processing. If a buffer is not flagged for a call-
back, the physical driver does not notify the device manager when the
buffer is processed. If, however, the buffer is flagged for a callback (once
the buffer is processed), the physical driver is obligated to set the pro-
cessed flag and processed size field in the buffer, and to notify the device
manager via the device manager's callback function that was passed to the
physical driver as a parameter in the
buffer has completed processing.
10-54
as this routine should never get
adi_pdd_Open
VisualDSP++ 5.0 Device Drivers and System
Services Manual for Blackfin Processors
adi_pdd_Read
function call, that the

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?

Table of Contents