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


 
Getting Started with ADSP-BF548 EZ-KIT Lite 6-7
Using ADSP-BF548 EZ-KIT Lite Keypad and LED Indicator
Example 7: Source Files
A VDK application typically does not define a main() function: VDK
contains a default main() that performs the necessary initialization and
starts the scheduler, resulting in execution of one boot thread. However,
the default version only initializes the VDK system, while we want our
example program to initialize the SSL in the same manner as the previous
examples. Therefore, we provide our own main() in the main.c file
(see Listing 6-1).
Listing 6-1. main.c File
#include “VDK.h”
#include “adi_ssl_Init.h”
int main(void)
{
adi_ssl_Init(); /* initialize the SSL */
VDK_Initialize(); /* initialize VDK and boot-time objects */
VDK_Run(); /* start VDK's thread scheduler */
return 0;
}
Listing 6-1 shows the two essential VDK API calls preceded by a call to
the common code that initializes the SSL, as used in several other exam-
ples. The
adi_ssl_Init.h include file defines the SSL resources required
for the project.
The source files generated by the Project Wizard for the project’s thread
types and device driver consist essentially of empty definitions of the func-
tions that the VDK thread control and device handling models require.
See the VisualDSP++ 5.0 Kernel (VDK) User’s Guide for more
information.