Omnimaga

Calculator Community => TI Calculators => Calculator C => Topic started by: null on December 15, 2010, 05:15:06 pm

Title: Keypad switching
Post by: null on December 15, 2010, 05:15:06 pm
Hi everyone,

I'm working on a project for the Nspire with Ndless 1.7, and I'd like to use the 84+ keypad. What I'd like to know is how the Nspire detects keypad removal (Keypad interrupt? GPIO interrupt? Hackspire doesn't really make this clear) so I can stop it from doing anything. I also don't get how the OS detects which keypad is currently installed.

Thanks!
Title: Re: Keypad switching
Post by: apcalc on December 15, 2010, 05:35:29 pm
Hi, Welcome to Omnimaga! :)

While running an Ndless program, you can switch keypads all you want.  Once the Ndless program starts, the OS interrupt that usually checks for a keypad stops running; therefore, keypad switching is allowed.

Good luck with your project!
Title: Re: Keypad switching
Post by: DJ Omnimaga on December 15, 2010, 10:45:33 pm
Heya and welcome to the forums! I can't wait to hear of your project! :)
Title: Re: Keypad switching
Post by: bwang on December 28, 2010, 05:42:55 pm
Unless something has happened in the two-ish months that I have been absent (and it very well might have), we have no way to detect which keypad is installed.
Title: Re: Keypad switching
Post by: ExtendeD on December 28, 2010, 06:11:06 pm
There's some keypad-related work in function 0x10013958 of OS 2.0.1 non-CAS.
It seems to detect the transition from a Clickpad/Touchpad keypad to a 84+ keypad (but could probably be adapted). The OS variable 0x10733DA8 is "keypad_type" and contains a value between 1 and 4 (see this description (http://ourl.ca/8160/158049)).
The functions 0x10276B84 and 0x10091F90 involve the currently undocumented I/O ports (http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#900B0000_-_Power_management) 0x900B0018 et 0x900B0020, there's probably something to do with them.
Title: Re: Keypad switching
Post by: DJ Omnimaga on December 30, 2010, 01:15:28 am
Yeah, I remember when calc84maniac worked on z80nspire, I could swap the keypads while it ran and the calc did not do anything. I could continue using the emu fine with both keypads.
Title: Re: Keypad switching
Post by: fb39ca4 on December 31, 2010, 10:31:15 am
^^what they said.
I've also been able to take out the batteries while the calc is plugged in during an ndless program, so obviously this isn't a problem.
Title: Re: Keypad switching
Post by: willrandship on January 20, 2011, 11:10:58 pm
You might just have an option, perhaps in a menu, that allows you to choose which keypad if you need to switch between them.