diff options
| author | Drashna Jaelre <drashna@live.com> | 2018-05-16 13:51:24 -0700 |
|---|---|---|
| committer | skullydazed <skullydazed@users.noreply.github.com> | 2018-05-20 21:30:14 -0700 |
| commit | 8729be543414649b1964f9ab48de41256531ef2e (patch) | |
| tree | 4027104f6211876b44e8b12660e25694293d2dd5 /tmk_core/common/avr | |
| parent | f698bbcd65426cf7144b886f7fc7ec29d6d7c41f (diff) | |
| download | qmk_firmware-8729be543414649b1964f9ab48de41256531ef2e.tar.gz qmk_firmware-8729be543414649b1964f9ab48de41256531ef2e.zip | |
Fix compile issues for atmega328p
Diffstat (limited to 'tmk_core/common/avr')
| -rw-r--r-- | tmk_core/common/avr/bootloader.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c index d89c8d768..c4b913280 100644 --- a/tmk_core/common/avr/bootloader.c +++ b/tmk_core/common/avr/bootloader.c | |||
| @@ -72,7 +72,7 @@ | |||
| 72 | #define BOOTLOADER_RESET_KEY 0xB007B007 | 72 | #define BOOTLOADER_RESET_KEY 0xB007B007 |
| 73 | uint32_t reset_key __attribute__ ((section (".noinit"))); | 73 | uint32_t reset_key __attribute__ ((section (".noinit"))); |
| 74 | 74 | ||
| 75 | /** \brief initialize MCU status by watchdog reset | 75 | /** \brief initialize MCU status by watchdog reset |
| 76 | * | 76 | * |
| 77 | * FIXME: needs doc | 77 | * FIXME: needs doc |
| 78 | */ | 78 | */ |
| @@ -81,7 +81,7 @@ void bootloader_jump(void) { | |||
| 81 | #if !defined(BOOTLOADER_SIZE) | 81 | #if !defined(BOOTLOADER_SIZE) |
| 82 | uint8_t high_fuse = boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS); | 82 | uint8_t high_fuse = boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS); |
| 83 | 83 | ||
| 84 | if (high_fuse & BOOT_SIZE_256) { | 84 | if (high_fuse & BOOT_SIZE_256) { |
| 85 | bootloader_start = (FLASH_SIZE - 512) >> 1; | 85 | bootloader_start = (FLASH_SIZE - 512) >> 1; |
| 86 | } else if (high_fuse & BOOT_SIZE_512) { | 86 | } else if (high_fuse & BOOT_SIZE_512) { |
| 87 | bootloader_start = (FLASH_SIZE - 1024) >> 1; | 87 | bootloader_start = (FLASH_SIZE - 1024) >> 1; |
| @@ -130,7 +130,7 @@ void bootloader_jump(void) { | |||
| 130 | DDRA = 0; DDRB = 0; DDRC = 0; DDRD = 0; DDRE = 0; DDRF = 0; | 130 | DDRA = 0; DDRB = 0; DDRC = 0; DDRD = 0; DDRE = 0; DDRF = 0; |
| 131 | PORTA = 0; PORTB = 0; PORTC = 0; PORTD = 0; PORTE = 0; PORTF = 0; | 131 | PORTA = 0; PORTB = 0; PORTC = 0; PORTD = 0; PORTE = 0; PORTF = 0; |
| 132 | asm volatile("jmp 0x1FC00"); | 132 | asm volatile("jmp 0x1FC00"); |
| 133 | #endif | 133 | #endif |
| 134 | 134 | ||
| 135 | #elif defined(BOOTLOADER_CATERINA) | 135 | #elif defined(BOOTLOADER_CATERINA) |
| 136 | // this block may be optional | 136 | // this block may be optional |
| @@ -151,7 +151,7 @@ void bootloader_jump(void) { | |||
| 151 | 151 | ||
| 152 | #else // Assume remaining boards are DFU, even if the flag isn't set | 152 | #else // Assume remaining boards are DFU, even if the flag isn't set |
| 153 | 153 | ||
| 154 | #ifndef __AVR_ATmega32A__ // no USB - maybe BOOTLOADER_BOOTLOADHID instead though? | 154 | #if !(defined(__AVR_ATmega32A__) || defined(__AVR_ATmega328P__)) // no USB - maybe BOOTLOADER_BOOTLOADHID instead though? |
| 155 | UDCON = 1; | 155 | UDCON = 1; |
| 156 | USBCON = (1<<FRZCLK); // disable USB | 156 | USBCON = (1<<FRZCLK); // disable USB |
| 157 | UCSR1B = 0; | 157 | UCSR1B = 0; |
