From b8c86f45da2b70f97c974a590103804a98ecd005 Mon Sep 17 00:00:00 2001 From: Alexey 'Cluster' Avdyukhin Date: Wed, 29 Jan 2014 07:32:01 +0400 Subject: Initialization moved to functions --- main.c | 67 ++++++++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/main.c b/main.c index 2512e40..cd446e8 100644 --- a/main.c +++ b/main.c @@ -4,7 +4,6 @@ #include #include "wiimote.h" - // classic controller id const unsigned char classic_controller_id[6] = {0x00, 0x00, 0xA4, 0x20, 0x01, 0x01}; @@ -22,6 +21,14 @@ const unsigned char cal_data[32] = { volatile int red_led_timer = 0; +void init_nes_gamepad() +{ + NES_PORT_DDR |= 1<