Using the Device Manager
dataflow method, once the buffer has been provided to the device driver,
the application never needs to give the device another buffer, as the same
one is used indefinitely.
When a device is configured to use the chained dataflow method, any
number of one-dimensional and two-dimensional buffers can be provided
to the device. Buffers can be given to the device one at a time, or multiple
buffers can be provided with a single call to
. The application can provide the device driver with additional
dev_Write
buffers at any time before (or even after) dataflow is enabled. Assuming
the device driver is running in asynchronous mode, any individual buffer,
no buffers, or all buffers can be flagged to generate a callback when the
device driver has completed processing it. Each buffer can be of a different
size, and both one-dimensional and two-dimensional buffers can be pro-
vided to the same device.
Providing buffers to devices configured with the chained-with-loopback
dataflow method is identical to providing buffers to devices using the
chained dataflow method, except that buffers can only be provided while
dataflow is disabled.
Closing a Device
When the device is no longer needed by the client, the device is closed via
the
adi_dev_Close
nates dataflow if it is enabled and frees up all resources, including DMA
and others used by the device driver. Should the application need to reuse
the device after it is closed, it can be reopened via the
function.
Callbacks
The device manager calls the application's callback function to notify
the client of occurring events. Events include expected events (such as
completion of buffer processing) or unexpected events (such as an error
occurring on a device). Typically, the client's callback function
10-16
API function call. The
VisualDSP++ 5.0 Device Drivers and System
Services Manual for Blackfin Processors
and/or
adi_dev_Read
function termi-
adi_dev_Close
adi_dev_Open
adi_
Need help?
Do you have a question about the VisualDSP++ 5.0 and is the answer not in the manual?