Enable GCC's -pipe option by default, to build projects using intermediary logical...
[pub/USBasp.git] / Bootloaders / CDC / BootloaderCDC.h
index bfc8af5..36af962 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2011.
+     Copyright (C) Dean Camera, 2012.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2012  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
@@ -47,6 +47,7 @@
 
                #include "Descriptors.h"
                #include "BootloaderAPI.h"
 
                #include "Descriptors.h"
                #include "BootloaderAPI.h"
+               #include "Config/AppConfig.h"
 
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Board/LEDs.h>
 
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Board/LEDs.h>
                /** Eight character bootloader firmware identifier reported to the host when requested */
                #define SOFTWARE_IDENTIFIER          "LUFACDC"
 
                /** Eight character bootloader firmware identifier reported to the host when requested */
                #define SOFTWARE_IDENTIFIER          "LUFACDC"
 
+               /** Magic bootloader key to unlock forced application start mode. */
+               #define MAGIC_BOOT_KEY            0xDC42CACA
+               
        /* Type Defines: */
                /** Type define for a non-returning pointer to the start of the loaded application in flash memory. */
                typedef void (*AppPtr_t)(void) ATTR_NO_RETURN;
 
        /* Function Prototypes: */
        /* Type Defines: */
                /** Type define for a non-returning pointer to the start of the loaded application in flash memory. */
                typedef void (*AppPtr_t)(void) ATTR_NO_RETURN;
 
        /* Function Prototypes: */
-               void CDC_Task(void);
-               void SetupHardware(void);
+               static void CDC_Task(void);
+               static void SetupHardware(void);
+
+               void Application_Jump_Check(void) ATTR_INIT_SECTION(3);
 
                void EVENT_USB_Device_ConfigurationChanged(void);
 
 
                void EVENT_USB_Device_ConfigurationChanged(void);