Documentation: Update copyrights to 2019.
[pub/lufa.git] / Demos / Host / LowLevel / KeyboardHostWithParser / KeyboardHostWithParser.c
index 4837076..15565e4 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2011.
+     Copyright (C) Dean Camera, 2019.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2019  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
@@ -18,7 +18,7 @@
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
-  The author disclaim all warranties with regard to this
+  The author disclaims all warranties with regard to this
   software, including all implied warranties of merchantability
   and fitness.  In no event shall the author be liable for any
   special, indirect or consequential damages or any damages
@@ -46,7 +46,7 @@ int main(void)
        puts_P(PSTR(ESC_FG_CYAN "Keyboard HID Parser Host Demo running.\r\n" ESC_FG_WHITE));
 
        LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
-       sei();
+       GlobalInterruptEnable();
 
        for (;;)
        {
@@ -59,12 +59,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 */
        Serial_Init(9600, false);
@@ -181,7 +183,7 @@ void KeyboardHost_Task(void)
 {
        if (USB_HostState != HOST_STATE_Configured)
          return;
-       
+
        /* Select and unfreeze keyboard data pipe */
        Pipe_SelectPipe(KEYBOARD_DATA_IN_PIPE);
        Pipe_Unfreeze();
@@ -259,7 +261,7 @@ void ProcessKeyboardReport(uint8_t* KeyboardReport)
                                }
                                else if (KeyCode == HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS)
                                {
-                                       PressedKey = '0';                                               
+                                       PressedKey = '0';
                                }
                                else if (KeyCode == HID_KEYBOARD_SC_SPACE)
                                {