aboutsummaryrefslogtreecommitdiff
path: root/bootloaders/nuevo_diskloader/src
diff options
context:
space:
mode:
authorZach Eveland <zeveland@blacklabel-development.com>2011-10-21 17:16:48 -0400
committerZach Eveland <zeveland@blacklabel-development.com>2011-10-21 17:16:48 -0400
commitad95bc05f498d1748299fa1ea6838d16f03064be (patch)
tree5b57c7d2649f8d51724761920db4a51b7a6106b8 /bootloaders/nuevo_diskloader/src
parent13c5eccbe37e939350846559930edc3781a5817e (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.cpp12
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();