#152656 - jiversen - Wed Mar 19, 2008 2:31 am
Hi,
I would like the DS to generate an interrupt when the pen touches the touch screen. Can it? I've been reading everything I can find and don't have a definite answer.
The one thing that gave me a sense of the _possibility_ is the comment 'Not sure if the TSC [touch screen controller] /PENIRQ is actually triggering an IRQ on the NDS' found in the nocash gbatek document (nocash.emubase.de/gbatek.htm).
However, everything else seems like evidence against this possibility:
1) All the code I've examined (libnds, dslinux) just regularly polls REG_KEYXY (libnds), typically during Vblank or Vcount interrupt handler. [On the other hand, key interrupts aren't typically used for the other keys, even though they are available, so this doesn't prove anything].
2) I haven't found any reference to interrupt enable flags for any of the 'new' arm7-only accessible keys (e.g. X, Y). This leads one to think there may be no interrupt support for the pen either. But the hinge does give an interrupt...
I'm hoping someone may have direct knowledge that they are willing to share.
Thanks
John
PS. If you care, the reason for the request is an interest in achieving timing accuracy greater than 1/60 second in recording pen-down times.
PPS. This is my first post, so I'd like to also say I've been amazed by the wealth of information and individuals' dedication to the DS homebrew found in this forum and online and in code made freely available. I've learned tremendously from all of your efforts. It's so much fun. I humbly say Thank You!
I would like the DS to generate an interrupt when the pen touches the touch screen. Can it? I've been reading everything I can find and don't have a definite answer.
The one thing that gave me a sense of the _possibility_ is the comment 'Not sure if the TSC [touch screen controller] /PENIRQ is actually triggering an IRQ on the NDS' found in the nocash gbatek document (nocash.emubase.de/gbatek.htm).
However, everything else seems like evidence against this possibility:
1) All the code I've examined (libnds, dslinux) just regularly polls REG_KEYXY (libnds), typically during Vblank or Vcount interrupt handler. [On the other hand, key interrupts aren't typically used for the other keys, even though they are available, so this doesn't prove anything].
2) I haven't found any reference to interrupt enable flags for any of the 'new' arm7-only accessible keys (e.g. X, Y). This leads one to think there may be no interrupt support for the pen either. But the hinge does give an interrupt...
I'm hoping someone may have direct knowledge that they are willing to share.
Thanks
John
PS. If you care, the reason for the request is an interest in achieving timing accuracy greater than 1/60 second in recording pen-down times.
PPS. This is my first post, so I'd like to also say I've been amazed by the wealth of information and individuals' dedication to the DS homebrew found in this forum and online and in code made freely available. I've learned tremendously from all of your efforts. It's so much fun. I humbly say Thank You!