MCUCSR = 0; /* clear all reset flags for next time */
}
+#if BOOTLOADER_CAN_EXIT
static inline void bootLoaderExit(void)
{
PIN_PORT(JUMPER_PORT) = 0; /* undo bootLoaderInit() changes */
}
+#endif
#define bootLoaderCondition() ((PIN_PIN(JUMPER_PORT) & (1 << PIN(JUMPER_PORT, JUMPER_BIT))) == 0)
#include <string.h>
-
-static void leaveBootloader() __attribute__((__noreturn__));
-
#include "bootloaderconfig.h"
#include "usbdrv/usbdrv.c"
+#if BOOTLOADER_CAN_EXIT
+static void leaveBootloader() __attribute__((__noreturn__));
+#endif
+
#ifndef BOOTLOADER_ADDRESS
#error need to know the bootloaders flash address!
#endif
/* ------------------------------------------------------------------------ */
+#if BOOTLOADER_CAN_EXIT
static void (*nullVector)(void) __attribute__((__noreturn__));
static void leaveBootloader()
*/
nullVector();
}
+#endif
/* ------------------------------------------------------------------------ */
}while (1); /* main event loop */
#endif
}
+#if BOOTLOADER_CAN_EXIT
leaveBootloader();
+#endif
}
/* ------------------------------------------------------------------------ */