diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2011-10-21 17:16:48 -0400 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2011-10-21 17:16:48 -0400 |
commit | ad95bc05f498d1748299fa1ea6838d16f03064be (patch) | |
tree | 5b57c7d2649f8d51724761920db4a51b7a6106b8 /bootloaders/nuevo_diskloader/src | |
parent | 13c5eccbe37e939350846559930edc3781a5817e (diff) |
Enumerates! used inline ASM for operation which moves interrupts to boot section
Diffstat (limited to 'bootloaders/nuevo_diskloader/src')
-rw-r--r-- | bootloaders/nuevo_diskloader/src/DiskLoader.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bootloaders/nuevo_diskloader/src/DiskLoader.cpp b/bootloaders/nuevo_diskloader/src/DiskLoader.cpp index 6dda4ae..10544d1 100644 --- a/bootloaders/nuevo_diskloader/src/DiskLoader.cpp +++ b/bootloaders/nuevo_diskloader/src/DiskLoader.cpp @@ -27,13 +27,15 @@ ISR(BADISR_vect) int main(void) __attribute__ ((naked)); int main() { - /* Enable change of interrupt vectors */ - MCUCR = (1<<IVCE); - /* Move interrupts to boot flash section */ - MCUCR = (1<<IVSEL); - + wdt_disable(); BOARD_INIT(); + asm volatile ( + "ldi r16, 0x01\n" // (1<<IVCE) /* Enable change of interrupt vectors */ + "out 0x35, r16\n" // MCUCR + "ldi r16, 0x02\n" // (1<<IVSEL) /* Move interrupts to boot flash section */ + "out 0x35, r16\n" // MCUCR + ); TX_LED_OFF(); RX_LED_OFF(); L_LED_OFF(); |