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


 
Example 5: USB Project
4-4 Getting Started with ADSP-BF548 EZ-KIT Lite
adi_ssl_Init.h to specify their requirements. The common func-
tions in adi_ssl_Init.c perform the SSL initialization, according
to the requirements, and the final closing.
The code in main() is also straightforward. After initializing the SSL, the
code does the following.
1. Uses the device manager to open and obtain a handle for the USB
mass storage device driver. The only unusual aspect is that the
adi_dev_Open() function requires the address of a callback func-
tion while the USB mass storage device driver does not invoke the
callback. Our example supplies the address of a dummy callback
function (Callback()).
2. Uses the standard configuration mechanism, adi_dev_Control(),
to pass the ADI_USB_MSD_CMD_INIT_RAW_PID command to the USB
mass storage device driver. The command instructs the driver to
initialize a lower-level driver responsible for physical access to the
EZ-KIT Lite hard disk, then set a flag indicating the operation’s
success.
3. Uses adi_dev_Control() again, this time passing a table of com-
mands rather than a single instance. Some commands in the table
are generic and relate to the common device driver model, the rest
are specific to the USB mass storage device driver. Table 4-1 lists
the commands passed to the table and gives a brief description of
each command.
Note that the USB vendor ID, peripheral/class ID and peripheral
serial number values used in this example program are for demon-
stration purposes and must not be used in your production
software.
4. Prints a message to the VisualDSP++ Console window indicating
that the EZ-KIT Lite is now ready to connect to a USB host.