gbasys

view src/input.h @ 2:e3dc7705ad9c

communications stuff
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 07 Mar 2012 06:11:51 +0200
parents
children 06726f0b8cd3
line source
1 /*
2 Copyright 2004 John Tsiombikas <nuclear@siggraph.org>
4 This file is part of libgba, a library for GameBoy Advance development.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
21 #ifndef _INPUT_H_
22 #define _INPUT_H_
24 enum {
25 KEY_A = 1,
26 KEY_B = 2,
27 KEY_SELECT = 4,
28 KEY_START = 8,
29 KEY_RIGHT = 16,
30 KEY_LEFT = 32,
31 KEY_UP = 64,
32 KEY_DOWN = 128,
33 KEY_R = 256,
34 KEY_L = 512,
35 KEY_ALL = 1023
36 };
38 #define KEY_COUNT 14
40 extern volatile unsigned short *reg_key_state;
42 int get_key_state(int key);
43 void enable_key_interrupts(int keys);
44 void disable_key_interrupts(int keys);
46 #endif /* _INPUT_H_ */