Fix AVRISP-MKII status values to match the published protocol (thanks to Gustavo...
[pub/USBasp.git] / Projects / Magstripe / Magstripe.c
index 85df8b5..7cf7373 100644 (file)
@@ -1,6 +1,6 @@
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2013.
+     Copyright (C) Dean Camera, 2014.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
@@ -8,7 +8,7 @@
 
 /*
   Copyright 2010  Denver Gingerich (denver [at] ossguy [dot] com)
-  Copyright 2013  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2014  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
@@ -56,7 +56,7 @@ USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
        {
                .Config =
                        {
-                               .InterfaceNumber            = 0,
+                               .InterfaceNumber            = INTERFACE_ID_Keyboard,
                                .ReportINEndpoint           =
                                        {
                                                .Address            = KEYBOARD_EPADDR,
@@ -94,12 +94,14 @@ int main(void)
 /** Configures the board hardware and chip peripherals for the demo's functionality. */
 void SetupHardware(void)
 {
+#if (ARCH == ARCH_AVR8)
        /* Disable watchdog if enabled by bootloader/fuses */
        MCUSR &= ~(1 << WDRF);
        wdt_disable();
 
        /* Disable clock division */
        clock_prescale_set(clock_div_1);
+#endif
 
        /* Hardware Initialization */
        Magstripe_Init();