Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/nes2wii.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCluster <clusterrr@clusterrr.com>2015-03-24 22:39:59 +0300
committerCluster <clusterrr@clusterrr.com>2015-03-24 22:39:59 +0300
commit4706ce00ad132c5a7987e7aadc6d94eb42e0bc4b (patch)
treec3331573974667366d5901402b076b5699358fb1
parent69b2926c57c7f3928f23b6fdb001333149733511 (diff)
Tiny fix
-rw-r--r--gamepad.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gamepad.c b/gamepad.c
index dd6967a..0494208 100644
--- a/gamepad.c
+++ b/gamepad.c
@@ -3,6 +3,8 @@
#include <util/delay.h>
#include "gamepad.h"
+#ifdef NES_ENABLED
+
void init_nes_gamepad()
{
NES_PORT_DDR |= 1<<NES_LATCH_PIN; // Latch, output
@@ -27,7 +29,9 @@ uint8_t get_nes_gamepad()
NES_PORT_PORT |= 1<<NES_LATCH_PIN; // Latch
return gamepad_data;
}
+#endif
+#ifdef SNES_ENABLED
void init_snes_gamepad()
{
SNES_PORT_DDR |= 1<<SNES_LATCH_PIN; // Latch, output
@@ -52,7 +56,9 @@ uint16_t get_snes_gamepad()
SNES_PORT_PORT |= 1<<SNES_LATCH_PIN; // Latch
return gamepad_data;
}
+#endif
+#ifdef N64_ENABLED
void init_n64_gamepad()
{
TCCR0 |= _BV(CS00); // Timer
@@ -79,7 +85,9 @@ int get_n64_gamepad(uint8_t* data)
}
return 1;
}
+#endif
+#ifdef SMD_ENABLED
void init_smd_gamepad()
{
SMD_SELECT_PORT_DDR |= 1<<SMD_SELECT_PIN; // Select, output
@@ -119,7 +127,9 @@ uint16_t get_smd_gamepad()
| (((SMD_DATA_PORT_PIN>>SMD_DATA5_PIN)&1)<<5);
return ((uint16_t)gamepad_data_high<<8) | gamepad_data_low;
}
+#endif
+#ifdef DUALSHOCK_ENABLED
void init_dualshock_gamepad()
{
DUALSHOCK_PORT_DDR |= (1<<DUALSHOCK_COMMAND_PIN); // Command pin - output
@@ -210,3 +220,4 @@ int get_dualshock_gamepad(uint8_t* data, int size, uint8_t motor_small, uint8_t
}
return 1;
}
+#endif