this is avaiable project
Fork of LoRaMacLib by
Diff: board/NVIC_set_all_priorities.cpp
- Revision:
- 0:9be122c18509
diff -r 000000000000 -r 9be122c18509 board/NVIC_set_all_priorities.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/board/NVIC_set_all_priorities.cpp Wed Aug 12 14:08:29 2015 +0000 @@ -0,0 +1,20 @@ +/************************************************************************************************** + ***** ***** + ***** Name: NVIC_set_all_priorities.cpp ***** + ***** Date: 18/09/2013 ***** + ***** Auth: Frank Vannieuwkerke ***** + ***** Func: library for changing all IRQ priorities at once ***** + ***** Supported targets : see enum declaration in .h file ***** + ***** ***** + **************************************************************************************************/ + +#include "NVIC_set_all_priorities.h" + +void NVIC_set_all_irq_priorities(int priority) +{ + int irqnum; + for(irqnum = first_IRQ_number ; irqnum < last_IRQ_number + 1 ; irqnum++) + NVIC_SetPriority((IRQn_Type)irqnum, priority); +} + + \ No newline at end of file