void print_key( u16 in_key )
{
u8 cnt = 0;
static PGM KeybCode[] = {12,11,9,6,3,8,10,5,2,1,4,7,13,14};
if( in_key )
{
for( u16 mask = (1 << 0); mask; )
{
if( in_key & mask )
printf("KN%d\n", KeybCode[cnt] );
mask <<= 1;
cnt++;
}
}
else
printf("RELEASE\n");
}
print_key( Keyb );