Page 1 of 1
multitasking prob
Posted: Wed Jul 02, 2008 3:23 am
by octa
i have setup multitasking successfully (i think)..
there is task switching every 1/18th of a second..
but when i type anything i get a scan code of -64 during key released why is it ??
Re: multitasking prob
Posted: Wed Jul 02, 2008 4:15 am
by AJ
Hi,
Remember that the keyboard scancodes are unsigned, making that code 0xC0 - the top bit is a release bit, making the actual keypress 0x40 (which translates to F6 on my key map).
Are you pressing F6 as the first key and have you declared all appropriate keyboard variables volatile?
Cheers,
Adam
Re: multitasking prob
Posted: Wed Jul 02, 2008 5:09 am
by octa
AJ wrote:
Are you pressing F6 as the first key and have you declared all appropriate keyboard variables volatile?
No.. i do not pres F6..
only when i create thread i get this problem..
otherwise the keyboard driver works fine..
and after i press each key i get a scan code of -64...
not when i hold a key..
and this is not the release code as i have handled it..
Re: multitasking prob
Posted: Wed Jul 02, 2008 3:47 pm
by pcmattman
Umm...
and after i press each key i get a scan code of -64...
-64d == 0xC0.
So you are getting F6 scancodes if AJ is correct.
EDIT: 0xC0 in an unsigned environment, anyway. Don't use signed integers
