 //    If on Windows, run drivers\win\install_drivers.bat
 // Note: You may need to adjust permissions on some of the dll, exe and bat files.
 
-#include "dwt.h"
-
 // Facing Gamecube socket (as on console), flat on top:
 //    123
 //    ===

    }
  }

  if (savedInjectionMode != injectionMode && (millis()-lastChangedModeTime) >= saveInjectionModeAfterMillis) {
    saveInjectionMode(injectionMode);
    savedInjectionMode = injectionMode;
  }

  if (gameCubeReceiveReport(&data, 0)) {
#ifdef SERIAL_DEBUG
    Serial.println("buttons1 = "+String(data.buttons));  
    Serial.println("joystick = "+String(data.joystickX)+","+String(data.joystickY));  
    Serial.println("c-stick = "+String(data.cX)+","+String(data.cY));  
    Serial.println("shoulders = "+String(data.shoulderLeft)+","+String(data.shoulderRight));      
#else
    inject(injectors + injectionMode, &data);
#endif
  }

// Put LEDs + resistors (100-220 ohm) between PA0,PA1,PA2,PA3 and 3.3V
// Put momentary pushbuttons between PA4,PA5 and 3.3V

//#include "c:/users/alexander_pruss/Documents/Arduino/hardware/addMidiHID/STM32F1/system/libmaple/include/libmaple/iwdg.h"
#include <libmaple/iwdg.h>
#include "dwt.h"
#include "debounce.h"
#include "gamecube.h"

#undef SERIAL_DEBUG

const uint32_t watchdogSeconds = 10;
const uint32_t numInjectionModes = sizeof(injectors)/sizeof(*injectors);

const uint32_t indicatorLEDs[] = { PA0, PA1, PA2, PA3 };
