1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Centralized NVIC priorities

- NVIC priorities are moved to separate file, all values are replaced wit symbolic names. Priorities should be the same.
- tiny change in DMA initialization
This commit is contained in:
Petr Ledvina 2014-10-23 16:45:14 +02:00
parent 1604f856b8
commit e686b4504e
13 changed files with 120 additions and 49 deletions

View file

@ -21,6 +21,7 @@
#include <string.h>
#include "platform.h"
#include "nvic.h"
#include "gpio.h"
#include "system.h"
@ -312,8 +313,8 @@ void timerNVICConfigure(uint8_t irq)
NVIC_InitTypeDef NVIC_InitStructure;
NVIC_InitStructure.NVIC_IRQChannel = irq;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = TIMER_IRQ_PRIORITY;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = TIMER_IRQ_SUBPRIORITY;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
}