Example 7: Source Files
while (running){
unsigned
keycoords_t
/* get next keypress
r = VDK_SyncRead(
if (r == 0) {
/* pack row/col info into type word to avoid needing
/* a payload
int type = ((keypress.row << 8) | keypress.col);
VDK_MessageID msg = VDK_CreateMessage(
/* check that message was created OK
r = (msg == UINT_MAX);
if (r == 0) {
/* post message to LED display thread
VDK_PostMessage(
}
}
/* terminate loop if any errors detected
running = (r == 0);
}
VDK_CloseDevice(keypad_dd);
6-10
int r;
keypress;
keypad_dd,
(char*)&keypress, /* where to put next keypress */
1,
0);
type,
0,
NULL); /* no payload, address is NULL
LEDthread,
msg,
VDK_kMsgChannel1); /* queue to use in dest thread */
Getting Started with ADSP-BF548 EZ-KIT Lite
/* device descriptor for keypad */
/* number required (ignored)
/* no timeout - wait forever
/* type is row/col packed in int */
/* no payload, size is zero
/* destination thread instance */
/* the message's ID
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
Need help?
Do you have a question about the EZ-KIT and is the answer not in the manual?
Questions and answers