xmega compiling (not flashing yet)

This commit is contained in:
Jack Humbert
2018-01-16 02:15:21 -05:00
parent 5836d1a06a
commit 6b58b0c7dd
11 changed files with 152 additions and 2 deletions

View File

@@ -1082,6 +1082,7 @@ void virtser_send(const uint8_t byte)
******************************************************************************/
static void setup_mcu(void)
{
#ifndef __AVR_XMEGA__
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
@@ -1091,6 +1092,7 @@ static void setup_mcu(void)
CLKPR = (1 << CLKPCE);
CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0);
#endif
}
static void setup_usb(void)

View File

@@ -61,6 +61,11 @@ extern host_driver_t lufa_driver;
}
#endif
#ifdef __AVR_XMEGA__
#define MCUSR RST_STATUS
#define WDRF RST_WDRF_bp
#endif
/* extra report structure */
typedef struct {
uint8_t report_id;