Fix xmega initialization procedure.
[bertos.git] / bertos / cpu / avr / hw / init_xmega.c
index cabde0f36844e5fe758912b9661d78f10b79f4a0..028fe051ed18ee49bfeeff8cc5434a8ac58c3781 100644 (file)
@@ -32,6 +32,7 @@
  *
  *
  * \author Luca Ottaviano <lottaviano@develer.com>
+ * \author Onno <developer@gorgoz.org>
  *
  * \brief AVR XMega initialization routine.
  * notest:all
 #include <cfg/macros.h>
 #include <avr/io.h>
 
-void __init(void) NAKED __attribute__ ((section (".init3")));
+void init_xmega(void) NAKED __attribute__ ((constructor));
 
 /*
  * Initialize all interrupt priorities present in AVR XMega CPU.
  */
-void __init(void)
+void init_xmega(void)
 {
        PMIC.CTRL |= PMIC_LOLVLEX_bm | PMIC_MEDLVLEX_bm | PMIC_HILVLEX_bm;
 }