Author Topic: Keypad switching  (Read 5144 times)

0 Members and 1 Guest are viewing this topic.

Offline null

  • LV0 Newcomer (Next: 5)
  • Posts: 1
  • Rating: +0/-0
    • View Profile
Keypad switching
« 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!

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: Keypad switching
« Reply #1 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!


Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Keypad switching
« Reply #2 on: December 15, 2010, 10:45:33 pm »
Heya and welcome to the forums! I can't wait to hear of your project! :)

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Keypad switching
« Reply #3 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.

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: Keypad switching
« Reply #4 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).
The functions 0x10276B84 and 0x10091F90 involve the currently undocumented I/O ports 0x900B0018 et 0x900B0020, there's probably something to do with them.
Ndless.me with the finest TI-Nspire programs

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Keypad switching
« Reply #5 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.

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Keypad switching
« Reply #6 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.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Keypad switching
« Reply #7 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.