A SERVICE OF

logo

Getting Started with ADSP-BF548 EZ-KIT Lite 6-11
Using ADSP-BF548 EZ-KIT Lite Keypad and LED Indicator
VDK_DestroyThread(LEDthread, false);
/* This thread is automatically Destroyed when it exits its */
/* run function */
}
The code in Listing 6-2 does the following.
Opens the VDK-style keypad device which, as described above,
opens the SSL-style physical device driver for the keypad.
Creates an instance of LEDThreadType. The thread is created pro-
grammatically (rather than being created by VDK as a boot thread)
in order to obtain the thread’s identifier. The thread’s ID is
required to send messages to the thread. The newly created thread
is responsible for displaying key press row and column numbers on
the EZ-KIT Lite LED indicators.
Enters a loop to read details of the next key press from the keypad
driver (which blocks this thread if no key press is available), creates
a VDK message to hold the key press details, and posts the message
to the LED thread’s message queue.
Closes the device and terminates the LED thread before exiting
back to VDK. Note that this code runs only when an error is
detected in the preceding loop because no way of terminating the
program ‘cleanly’ has been implemented.
Code has been added to the initialization function in
LEDThreadType.c,
which:
Initializes the SSL’s programmable flag manager
Opens each of the six flags, which in turn control the EZ-KIT Lite
LED indicators