-/* Copyright (C) 2011 by Jacob Alexander
- *
+/* Copyright (C) 2011-2014 by Jacob Alexander
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// ----- Includes -----
-// AVR Includes
-#include <util/delay.h>
-#include <avr/interrupt.h>
+// Compiler Includes
+#include <Lib/MacroLib.h>
// Project Includes
#include <led.h>
#include <print.h>
#include <scan_loop.h>
-#include <usb_com.h>
+#include <output_com.h>
// Keymaps
#include <keymap.h>
void jumpToBootloader(void)
{
+#if defined(_at90usb162_) || defined(_atmega32u4_) || defined(_at90usb646_) || defined(_at90usb1286_) // AVR
cli();
// disable watchdog, if enabled
// disable all peripherals
PORTA = 0; PORTB = 0; PORTC = 0; PORTD = 0; PORTE = 0; PORTF = 0;
asm volatile("jmp 0x1FC00");
#endif
+#endif
}
// Given a sampling array, and the current number of detected keypress