Add USB_STRING_DESCRIPTOR and make the Keyboard demo use it.
[pub/USBasp.git] / Projects / MissileLauncher / MissileLauncher.c
index e143bec..5607d4a 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /*
  */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2014  Dean Camera (dean [at] fourwalledcubicle [dot] com)
   Copyright 2010  Dave Fletcher (fletch [at] fletchtronics [dot] net)
 
   Permission to use, copy, modify, distribute, and sell this
   Copyright 2010  Dave Fletcher (fletch [at] fletchtronics [dot] net)
 
   Permission to use, copy, modify, distribute, and sell this
@@ -20,7 +20,7 @@
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
   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
   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
@@ -98,13 +98,13 @@ int main(void)
        CmdState = CMD_STOP;
 
        LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
        CmdState = CMD_STOP;
 
        LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
-       sei();
+       GlobalInterruptEnable();
 
        for (;;)
        {
                Read_Joystick_Status();
                DiscardNextReport();
 
        for (;;)
        {
                Read_Joystick_Status();
                DiscardNextReport();
-               
+
                USB_USBTask();
        }
 }
                USB_USBTask();
        }
 }
@@ -112,12 +112,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 */
        LEDs_Init();
 
        /* Hardware Initialization */
        LEDs_Init();
@@ -158,7 +160,7 @@ void Send_Command_Report(const uint8_t* const Report,
        WriteNextReport(CmdBuffer, ReportSize);
 }
 
        WriteNextReport(CmdBuffer, ReportSize);
 }
 
-/** Sends one of the CMD_* command constants to the attached device.
+/** Sends one of the \c CMD_* command constants to the attached device.
  *
  *  \param[in] Command  One of the command constants.
  */
  *
  *  \param[in] Command  One of the command constants.
  */