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


 
Example 7: Source Files
6-12 Getting Started with ADSP-BF548 EZ-KIT Lite
Sets the flag directions to ‘out’
Clears the flags (turns each indicator off). Corresponding code
appears in the termination function to close each flag and termi-
nate the flag manager
The run function of the
LEDThreadType thread consists of an endless loop
that pends on the thread’s message queue waiting for the boot thread to
post a message. Then the run function retrieves the message, extracts the
row and column information, displays the row and column numbers on
the LED indicators, and disposes of the message. The message format is
simple since there is only one type of message involved, and all the data
required by LEDThreadType is packed into the message’s type word. VDK
also supports multiple message queues per thread, multiple user-defined
message types, and messages with data payloads.
When run, the example program first extinguishes any of the six LED
indicators that are lit. The six indicators are labelled LED 1 through LED 6
and located in a single row along the short edge of the EZ-KIT Lite board
(furthermost from the LCD screen). Then the program waits for one of
the keys on the 4 x 4 keypad to be pressed. The program displays that
key’s row number (in binary) on LEDs 6–4 and column number on
LEDs 3–1. Since row and column numbers are in the range 0–3, which
only requires two bits to display, LED 6 and LED 3 should never be lit.
The key labelled ENTER is at (row 0, column 0). Table 6-1 shows the LEDs
that will light for each key.
Table 6-1. Keypad Row/Column Display
Key Label LED
654321
1
2