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-05-25 22:22:37 +0300
committerCluster <clusterrr@clusterrr.com>2015-05-25 22:22:37 +0300
commite7426865567523b7fb1780631c982ec1be195390 (patch)
treedb78cf657740b25d362c77a7fb85ffe3fd01fe3f /nes2wii.h
parent4706ce00ad132c5a7987e7aadc6d94eb42e0bc4b (diff)
watchdog, support for connection detect pin
Diffstat (limited to 'nes2wii.h')
-rw-r--r--nes2wii.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/nes2wii.h b/nes2wii.h
index 1d72fc1..1ca4c22 100644
--- a/nes2wii.h
+++ b/nes2wii.h
@@ -13,6 +13,16 @@
#define twi_scl_pin TWI_SCL_PIN
#define twi_sda_pin TWI_SDA_PIN
+#ifdef DETECT_PORT
+#define DETECT_PORT_PORT PORT(DETECT_PORT)
+#define DETECT_PORT_DDR DDR(DETECT_PORT)
+#define WII_CONNECT DETECT_PORT_PORT |= (1<<DETECT_PIN)
+#define WII_DISCONNECT DETECT_PORT_PORT &= ~(1<<DETECT_PIN)
+#else
+#define WII_CONNECT
+#define WII_DISCONNECT
+#endif
+
#define PRESS_A but_dat[5] &= 0b11101111; // BZL BB BY BA BX BZR BDL BDU
#define PRESS_B but_dat[5] &= 0b10111111; // BZL BB BY BA BX BZR BDL BDU
#define PRESS_X but_dat[5] &= 0b11110111; // BZL BB BY BA BX BZR BDL BDU