HP (Hewlett-Packard) EZ-KIT Switch User Manual


 
Getting Started with ADSP-BF548 EZ-KIT Lite 3-9
Using ADSP-BF548 EZ-KIT Lite Peripherals
A successful call to
adi_dev_Open() results in a value identifying the ini-
tialized driver instance. We will use this value in future device manager
calls to identify the driver instance.
The adi_dev_Open() function takes nine arguments. The values supplied
by InitAudio() are:
adi_dev_ManagerHandle: The adi_dev_Open() function is part of
the device manager section of the SSL. All device driver-related
calls are made to the device manager, not directly to the drivers.
The device manager has been initialized elsewhere in the example;
the first argument in the call is a variable containing a reference to
the initialized device manager.
&ADIAD1980EntryPoint: Every device driver contains a static table
of information, such as function pointers defining its entry-points.
Device manager uses this information to identify and manage each
driver instance. The second argument passes the address of the
AD1980 device driver’s information table to the device manager.
0: There are multiple instances of various processor peripherals; for
example, multiple SPORTs and UARTs. The device manager and
the drivers for these peripherals need to know which SPORT or
UART is being opened. The third argument in the adi_dev_Open()
call is an integer that distinguishes between the multiple peripher-
als. There is only one AD1980 audio codec on the ADSP-BF548
EZ-KIT Lite, so we pass the value of 0.
NULL: An application that has opened two or more devices of the
same type must be able to distinguish between the devices when the
device manager signals a processing or error event. The fourth
argument in the adi_dev_Open() call attaches a value of type
void * to the instance of the device driver being opened. The
device manager remembers the value and presents it back when a