From c3d91eab8e67048493a306b83aadeee4a56bfa74 Mon Sep 17 00:00:00 2001 From: lottaviano Date: Sat, 9 Apr 2011 13:42:34 +0000 Subject: [PATCH] Add init file to enable all interrupt priorities at boot. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4845 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/avr/hw/init_xmega.c | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 bertos/cpu/avr/hw/init_xmega.c diff --git a/bertos/cpu/avr/hw/init_xmega.c b/bertos/cpu/avr/hw/init_xmega.c new file mode 100644 index 00000000..d032de37 --- /dev/null +++ b/bertos/cpu/avr/hw/init_xmega.c @@ -0,0 +1,49 @@ +/** + * \file + * + * + * + * \author Luca Ottaviano + * + * \brief AVR XMega initialization routine. + */ +#include +#include + +void __init(void) NAKED __attribute__ ((section (".init3"))); + +/* + * Initialize all interrupt priorities present in AVR XMega CPU. + */ +void __init(void) +{ + PMIC.CTRL |= PMIC_LOLVLEX_bm | PMIC_MEDLVLEX_bm | PMIC_HILVLEX_bm; +} -- 2.25.1