View Single Post
  #6   Spotlight this post!  
Unread 10-02-2011, 21:59
demosthenes2k8's Avatar
demosthenes2k8 demosthenes2k8 is online now
Graduated but not gone
AKA: Matt Soucy
FRC #0166 (Chop Shop 166)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Merrimack, NH
Posts: 589
demosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to behold
Send a message via AIM to demosthenes2k8 Send a message via Yahoo to demosthenes2k8
Re: Better bitwise conversion

keys stores them differently, according to this:
Code:
typedef enum KEYPAD_BITS {
  KEY_A      = BIT(0),  //!< Keypad A button.
  KEY_B      = BIT(1),  //!< Keypad B button.
  KEY_SELECT = BIT(2),  //!< Keypad SELECT button.
  KEY_START  = BIT(3),  //!< Keypad START button.
  KEY_RIGHT  = BIT(4),  //!< Keypad RIGHT button.
  KEY_LEFT   = BIT(5),  //!< Keypad LEFT button.
  KEY_UP     = BIT(6),  //!< Keypad UP button.
  KEY_DOWN   = BIT(7),  //!< Keypad DOWN button.
  KEY_R      = BIT(8),  //!< Right shoulder button.
  KEY_L      = BIT(9),  //!< Left shoulder button.
  KEY_X      = BIT(10), //!< Keypad X button.
  KEY_Y      = BIT(11), //!< Keypad Y button.
  KEY_TOUCH  = BIT(12), //!< Touchscreen pendown.
  KEY_LID    = BIT(13)  //!< Lid state.
} KEYPAD_BITS;
__________________


GSR Dean's List Finalist 2011
Reply With Quote