Statistics
| Branch: | Revision:

ddr4s / fw / wiringPi / devLib / piNes.h @ 32:cadb9025f1e0

History | View | Annotate | Download (1.41 KB)

1
/*
2
 * piNes.h:
3
 *        Driver for the NES Joystick controller on the Raspberry Pi
4
 *        Copyright (c) 2012 Gordon Henderson
5
 ***********************************************************************
6
 * This file is part of wiringPi:
7
 *        https://projects.drogon.net/raspberry-pi/wiringpi/
8
 *
9
 *    wiringPi is free software: you can redistribute it and/or modify
10
 *    it under the terms of the GNU Lesser General Public License as
11
 *    published by the Free Software Foundation, either version 3 of the
12
 *    License, or (at your option) any later version.
13
 *
14
 *    wiringPi is distributed in the hope that it will be useful,
15
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 *    GNU Lesser General Public License for more details.
18
 *
19
 *    You should have received a copy of the GNU Lesser General Public
20
 *    License along with wiringPi.
21
 *    If not, see <http://www.gnu.org/licenses/>.
22
 ***********************************************************************
23
 */
24

    
25
#define        MAX_NES_JOYSTICKS        8
26

    
27
#define        NES_RIGHT        0x01
28
#define        NES_LEFT        0x02
29
#define        NES_DOWN        0x04
30
#define        NES_UP                0x08
31
#define        NES_START        0x10
32
#define        NES_SELECT        0x20
33
#define        NES_B                0x40
34
#define        NES_A                0x80
35

    
36
#ifdef __cplusplus
37
extern "C" {
38
#endif
39

    
40
extern int          setupNesJoystick (int dPin, int cPin, int lPin) ;
41
extern unsigned int  readNesJoystick (int joystick) ;
42

    
43
#ifdef __cplusplus
44
}
45
#endif