00001 /*--------------------------------------------------------------------------------- 00002 00003 Copyright (C) 2010 00004 Jason Rogers (dovoto) 00005 Dave Murphy (WinterMute) 00006 00007 This software is provided 'as-is', without any express or implied 00008 warranty. In no event will the authors be held liable for any 00009 damages arising from the use of this software. 00010 00011 Permission is granted to anyone to use this software for any 00012 purpose, including commercial applications, and to alter it and 00013 redistribute it freely, subject to the following restrictions: 00014 00015 1. The origin of this software must not be misrepresented; you 00016 must not claim that you wrote the original software. If you use 00017 this software in a product, an acknowledgment in the product 00018 documentation would be appreciated but is not required. 00019 2. Altered source versions must be plainly marked as such, and 00020 must not be misrepresented as being the original software. 00021 3. This notice may not be removed or altered from any source 00022 distribution. 00023 00024 ---------------------------------------------------------------------------------*/ 00025 #ifndef _INPUT_H_ 00026 #define _INPUT_H_ 00027 00028 // Keyboard 00029 00031 typedef enum KEYPAD_BITS { 00032 KEY_A = BIT(0), 00033 KEY_B = BIT(1), 00034 KEY_SELECT = BIT(2), 00035 KEY_START = BIT(3), 00036 KEY_RIGHT = BIT(4), 00037 KEY_LEFT = BIT(5), 00038 KEY_UP = BIT(6), 00039 KEY_DOWN = BIT(7), 00040 KEY_R = BIT(8), 00041 KEY_L = BIT(9), 00042 KEY_X = BIT(10), 00043 KEY_Y = BIT(11), 00044 KEY_TOUCH = BIT(12), 00045 KEY_LID = BIT(13) 00046 } KEYPAD_BITS; 00047 00049 00052 #define REG_KEYINPUT (*(vuint16*)0x04000130) 00053 00055 #define REG_KEYCNT (*(vuint16*)0x04000132) 00056 00057 00058 #endif