this is avaiable project
Fork of LoRaMacLib by
board/NVIC_set_all_priorities.cpp@0:9be122c18509, 2015-08-12 (annotated)
- Committer:
- GregCr
- Date:
- Wed Aug 12 14:08:29 2015 +0000
- Revision:
- 0:9be122c18509
First Implementation
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
GregCr | 0:9be122c18509 | 1 | /************************************************************************************************** |
GregCr | 0:9be122c18509 | 2 | ***** ***** |
GregCr | 0:9be122c18509 | 3 | ***** Name: NVIC_set_all_priorities.cpp ***** |
GregCr | 0:9be122c18509 | 4 | ***** Date: 18/09/2013 ***** |
GregCr | 0:9be122c18509 | 5 | ***** Auth: Frank Vannieuwkerke ***** |
GregCr | 0:9be122c18509 | 6 | ***** Func: library for changing all IRQ priorities at once ***** |
GregCr | 0:9be122c18509 | 7 | ***** Supported targets : see enum declaration in .h file ***** |
GregCr | 0:9be122c18509 | 8 | ***** ***** |
GregCr | 0:9be122c18509 | 9 | **************************************************************************************************/ |
GregCr | 0:9be122c18509 | 10 | |
GregCr | 0:9be122c18509 | 11 | #include "NVIC_set_all_priorities.h" |
GregCr | 0:9be122c18509 | 12 | |
GregCr | 0:9be122c18509 | 13 | void NVIC_set_all_irq_priorities(int priority) |
GregCr | 0:9be122c18509 | 14 | { |
GregCr | 0:9be122c18509 | 15 | int irqnum; |
GregCr | 0:9be122c18509 | 16 | for(irqnum = first_IRQ_number ; irqnum < last_IRQ_number + 1 ; irqnum++) |
GregCr | 0:9be122c18509 | 17 | NVIC_SetPriority((IRQn_Type)irqnum, priority); |
GregCr | 0:9be122c18509 | 18 | } |
GregCr | 0:9be122c18509 | 19 | |
GregCr | 0:9be122c18509 | 20 |