diff options
author | Cluster <clusterrr@clusterrr.com> | 2015-05-25 22:22:37 +0300 |
---|---|---|
committer | Cluster <clusterrr@clusterrr.com> | 2015-05-25 22:22:37 +0300 |
commit | e7426865567523b7fb1780631c982ec1be195390 (patch) | |
tree | db78cf657740b25d362c77a7fb85ffe3fd01fe3f /nes2wii.h | |
parent | 4706ce00ad132c5a7987e7aadc6d94eb42e0bc4b (diff) |
watchdog, support for connection detect pin
Diffstat (limited to 'nes2wii.h')
-rw-r--r-- | nes2wii.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |