All Forums
 Hardware
 General Hardware, ADSmartIO, Digital I/O and A/Ds
 Keyscan
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

masseyi

20 Posts

Posted - 02 Mar 2006 :  05:56:07  Show Profile  Email Poster
Do I need to poll all the time to check whether a key has been pressed ? I'm using SIOReadKeypad, I set up a thread which just continually calls SIOReadKeypad.

Any help is much appreciated.

Steve

jlackey

213 Posts

Posted - 03 Mar 2006 :  09:25:35  Show Profile  Email Poster
If you set the keypad timeout to -1
    SetKeypadTimeout(-1);
then SIOReadKeypad() will wait for a keypress.
Go to Top of Page

masseyi

20 Posts

Posted - 06 Mar 2006 :  10:37:32  Show Profile  Email Poster
Ok, but do I still need to keep polling the SIOReadKeypad function within a loop to continually get the key pressed ? Could I not set up a notification ?
Under the hood, is the SIOReadKeypad() using interrupts ?

Thanks,
Steve
Go to Top of Page

bsamuels

53 Posts

Posted - 06 Mar 2006 :  10:54:01  Show Profile  Email Poster
Yes, you can set up a notification. See topic 2052 for a sample application.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000