diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2014-01-29 07:26:24 +0400 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2014-01-29 07:26:24 +0400 |
commit | 5623041d7a5359d09b22c8ddd4573d9fdd745ee9 (patch) | |
tree | fa1fd08896416b72a229c1a72bf83e3becfe831c | |
parent | cb9ce4288c2ceaf340b44aeef64ec1f39f310338 (diff) |
SMD time saving & init fixes
-rw-r--r-- | main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -118,11 +118,13 @@ int main() #ifdef SNES_ENABLED SNES_PORT_DDR |= 1<<SNES_LATCH_PIN; // Latch, output SNES_PORT_DDR |= 1<<SNES_CLOCK_PIN; // Clock, output + SNES_PORT_DDR &= ~(1<<SNES_DATA_PIN); // Data, input SNES_PORT_PORT |= 1<<SNES_DATA_PIN; // Data, pull-up #endif #ifdef NES_ENABLED NES_PORT_DDR |= 1<<NES_LATCH_PIN; // Latch, output NES_PORT_DDR |= 1<<NES_CLOCK_PIN; // Clock, output + NES_PORT_DDR &= ~(1<<NES_DATA_PIN); // Data, input NES_PORT_PORT |= 1<<NES_DATA_PIN; // Data, pull-up #endif #ifdef SMD_ENABLED @@ -406,6 +408,7 @@ int main() } } } + if (!smd_present) break; // Saving time } else { // 6-button mode for (b = 4; b <= 11; b++) { |