From: lottaviano Date: Sat, 9 Apr 2011 13:42:34 +0000 (+0000) Subject: Add init file to enable all interrupt priorities at boot. X-Git-Tag: 2.7.0~121 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=c3d91eab8e67048493a306b83aadeee4a56bfa74;p=bertos.git 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 --- 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; +}