keypad callbacks

I am writing a Photon application that uses a special keypad that sends it’s
data throught the serial port. I am trying to make some callbacks so that i
can get it to catch certain events like anykey pressed but most photon
functions can not be used in threads, interupt handlers, or signal handlers
so im not sure how to do this. Is there a way i can make callbacks to my
keypad so that i can have it interact with the photon gui im working on.

have you tried to just use the interrupt handler or signal handler to just
say “hey, this or that event happenned” and deal with it in the context of
your application (out of the handler)…


Nacho

“ben” <ben@paybycheck.com> escribió en el mensaje
news:915t3v$5uh$1@inn.qnx.com

I am writing a Photon application that uses a special keypad that sends
it’s
data throught the serial port. I am trying to make some callbacks so that
i
can get it to catch certain events like anykey pressed but most photon
functions can not be used in threads, interupt handlers, or signal
handlers
so im not sure how to do this. Is there a way i can make callbacks to my
keypad so that i can have it interact with the photon gui im working on.

ben <ben@paybycheck.com> wrote:

I am writing a Photon application that uses a special keypad that sends it’s
data throught the serial port. I am trying to make some callbacks so that i
can get it to catch certain events like anykey pressed but most photon
functions can not be used in threads, interupt handlers, or signal handlers
so im not sure how to do this. Is there a way i can make callbacks to my
keypad so that i can have it interact with the photon gui im working on.

Photon functions can be used in threads. Check out PtEnter() and PtLeave().

Also check out PtAppAddSignaProc(), allowing you to safely process signals in
the context of a photon app.