Add script reading bootloader flags
[pub/lufa.git] / Projects / Magstripe / Magstripe.c
index 85df8b5..f4c1b5a 100644 (file)
@@ -1,6 +1,6 @@
 /*
              LUFA Library
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2013.
+     Copyright (C) Dean Camera, 2021.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
@@ -8,7 +8,7 @@
 
 /*
   Copyright 2010  Denver Gingerich (denver [at] ossguy [dot] com)
 
 /*
   Copyright 2010  Denver Gingerich (denver [at] ossguy [dot] com)
-  Copyright 2013  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2021  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
 
   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 =
                        {
        {
                .Config =
                        {
-                               .InterfaceNumber            = 0,
+                               .InterfaceNumber            = INTERFACE_ID_Keyboard,
                                .ReportINEndpoint           =
                                        {
                                                .Address            = KEYBOARD_EPADDR,
                                .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)
 {
 /** 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);
        /* 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();
 
        /* Hardware Initialization */
        Magstripe_Init();