mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +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:
parent
1604f856b8
commit
e686b4504e
13 changed files with 120 additions and 49 deletions
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "common/color.h"
|
||||
#include "drivers/light_ws2811strip.h"
|
||||
#include "nvic.h"
|
||||
|
||||
void ws2811LedStripHardwareInit(void)
|
||||
{
|
||||
|
@ -96,8 +97,8 @@ void ws2811LedStripHardwareInit(void)
|
|||
NVIC_InitTypeDef NVIC_InitStructure;
|
||||
|
||||
NVIC_InitStructure.NVIC_IRQChannel = DMA1_Channel6_IRQn;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = WS2811_DMA_IRQ_PRIORITY;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = WS2811_DMA_IRQ_SUBPRIORITY;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue