-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- press and hold: send "r" key (for rewind function of RetroArch) - press and release three times: send "ESC" - press and release five times: shutdown
- Loading branch information
petrockblog
committed
Nov 13, 2012
1 parent
7952b58
commit 65bf6a5
Showing
2 changed files
with
110 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* SNESDev - Simulates a virtual keyboard for two SNES controllers that are | ||
* connected to the GPIO pins of the Raspberry Pi. | ||
* | ||
* (c) Copyright 2012 Florian Müller (petrockblog@flo-mueller.com) | ||
* | ||
* SNESDev homepage: https://github.com/petrockblog/SNESDev-RPi | ||
* | ||
* Permission to use, copy, modify and distribute SNESDev in both binary and | ||
* source form, for non-commercial purposes, is hereby granted without fee, | ||
* providing that this license information and copyright notice appear with | ||
* all copies and any derived work. | ||
* | ||
* This software is provided 'as-is', without any express or implied | ||
* warranty. In no event shall the authors be held liable for any damages | ||
* arising from the use of this software. | ||
* | ||
* SNESDev is freeware for PERSONAL USE only. Commercial users should | ||
* seek permission of the copyright holders first. Commercial use includes | ||
* charging money for SNESDev or software derived from SNESDev. | ||
* | ||
* The copyright holders request that bug fixes and improvements to the code | ||
* should be forwarded to them so everyone can benefit from the modifications | ||
* in future versions. | ||
* | ||
* Raspberry Pi is a trademark of the Raspberry Pi Foundation. | ||
*/ | ||
|
||
#ifndef button_h | ||
#define button_h | ||
|
||
#include <inttypes.h> | ||
#include <bcm2835.h> | ||
#include <unistd.h> | ||
#include <stdio.h> | ||
|
||
/* holds the GPIO pins for the clock, strobe and data signals */ | ||
typedef struct { | ||
int | ||
} button; | ||
|
||
|
||
/* check the state of each button of each controller */ | ||
void updateButton(); | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters