[gnoduino: 173/237] cleaning up code and comments in main - getting rid of leftover stuff from experiments
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnoduino: 173/237] cleaning up code and comments in main - getting rid of leftover stuff from experiments
- Date: Sat, 31 Mar 2012 20:29:22 +0000 (UTC)
commit 1e8127882eab8d17240e0cddb6b46caf09c16e57
Author: Zach Eveland <zeveland blacklabel-development com>
Date: Fri Oct 21 17:25:59 2011 -0400
cleaning up code and comments in main - getting rid of leftover stuff from experiments
.../nuevo_diskloader/src/DiskLoader.cpp | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/arduino/bootloaders/nuevo_diskloader/src/DiskLoader.cpp b/arduino/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
index 10544d1..83ffc1b 100644
--- a/arduino/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
+++ b/arduino/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
@@ -19,17 +19,15 @@ void entrypoint(void)
::);
}
-ISR(BADISR_vect)
-{
- L_LED_ON();
-}
-
int main(void) __attribute__ ((naked));
int main()
-{
-
+{
wdt_disable();
BOARD_INIT();
+ /* move interrupts to boot section:
+ * uses inline assembly because the procedure must be completed in four cycles.
+ * seems to fail if called before disabling WDT and calling BOARD_INIT()
+ */
asm volatile (
"ldi r16, 0x01\n" // (1<<IVCE) /* Enable change of interrupt vectors */
"out 0x35, r16\n" // MCUCR
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]