+/** Configures all hardware required for the bootloader. */\r
+void SetupHardware(void)\r
+{\r
+ /* Disable watchdog if enabled by bootloader/fuses */\r
+ MCUSR &= ~(1 << WDRF);\r
+ wdt_disable();\r
+\r
+ /* Disable clock division */\r
+ clock_prescale_set(clock_div_1);\r
+\r
+ /* Relocate the interrupt vector table to the bootloader section */\r
+ MCUCR = (1 << IVCE);\r
+ MCUCR = (1 << IVSEL);\r
+\r
+ /* Initialize USB subsystem */\r
+ USB_Init();\r
+}\r
+\r