Analog Devices VisualDSP++ 5.0 Service Manual page 447

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

Advertisement

For example, a physical driver for a DAC may define a command ID that
allows the application to set or detect the output volume level for the
DAC.
In a similar fashion, physical drivers can create additional event IDs that
they can pass back to the application. Physical drivers can create any
number of additional event IDs. Physical drivers can send these events to
the application via a callback to the device manager. When the device
manager's
PDDCallback
the event and parameters passed to the device manager's callback function
along to the application. This gives the physical driver the option of
creating additional event IDs that are relevant to the device being con-
trolled. For example, a physical driver that controls a device that is
detecting the level of a signal can create an event that notifies the
application when the signal has reached some predetermined value.
Physical drivers can also return custom-defined error codes. Physical
drivers can create any number of additional return codes. These drivers
can return these error codes in response to any physical driver API
function call from the device manager. The device manager routinely
looks for the
ADI_DEV_RESULT_SUCCESS
ADI_DEV_RESULT_SUCCESS
When a physical driver API function returns an error code not equal to
ADI_DEV_RESULT_SUCCESS
to the application as the return value for the device manager API function
that triggered the error. This gives the physical driver the option of
creating additional return codes that are relevant to the device being
controlled.
For example, a physical driver may return a unique error code in response
to a command to affect a parameter on the device. The physical driver
could return an error code that provides a high level of detail as to what
caused the error.
VisualDSP++ 5.0 Device Drivers and System
Services Manual for Blackfin Processors
function is passed an extended event ID, it passes
error code. Anything other than
is interpreted to be an error.
, the device manager passes the error code back
Device Driver Manager
10-49

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?

Subscribe to Our Youtube Channel

Table of Contents