is organized as the equivalent of a C switch statement, invoking the appro-
priate processing as required by the given event type. The device manager
defines several events and physical drivers can add additional events as
required by the device they are controlling.
Initialization Sequence
Because the device manager and physical drivers rely on system services, it
should be initialized prior to opening a device driver. For example, when
opening a device driver, the device manager requires handles to the
deferred callback and DMA services (assuming both are used). As such, it
is good practice to initialize and open the system services before opening
any device drivers. See
on page 1-24
for more information on initializing and terminating the
device drivers and system services.
Stackable Drivers
It is possible to create drivers that call other drivers. For example, the
Blackfin EZ-KIT Lite board contains an AD1836 audio codec. This codec
has a control and status interface that is suitable for connection to an SPI
port, while the AD1836 audio data is provided to/from the device by
using a high-speed serial line (in this case, the SPORT peripheral). If a
system is developed in which the AD1836 codec is the only device that
would ever be connected to the processor, a single physical device driver
could be written to control and manage the SPI and the SPORT.
Alternatively, the SPI port could hierarchically sit above the SPI and
SPORT drivers, making calls into those physical drivers as necessary. It is
especially true if other peripherals are to share the SPI port (for example,
separate SPI and SPORT drivers could be controlled by an AD1836
driver). In this stackable fashion, it is possible to create more complex
drivers such as the AD1836 driver or a TCP/IP stack driver that sit on top
of an Ethernet controller.
VisualDSP++ 5.0 Device Drivers and System
Services Manual for Blackfin Processors
"Initialization" on page 1-10
Device Driver Manager
and
"Termination"
10-17
Need help?
Do you have a question about the VisualDSP++ 5.0 and is the answer not in the manual?