mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
added support for FreeRTOS
This commit is contained in:
parent
b4f6e1e553
commit
ada61ef06b
@ -873,14 +873,17 @@ uavcan::int16_t CanDriver::select(uavcan::CanSelectMasks& inout_masks,
|
||||
|
||||
static void nvicEnableVector(IRQn_Type irq, uint8_t prio)
|
||||
{
|
||||
/*NVIC_InitTypeDef NVIC_InitStructure;
|
||||
#if !defined (USE_HAL_DRIVER)
|
||||
NVIC_InitTypeDef NVIC_InitStructure;
|
||||
NVIC_InitStructure.NVIC_IRQChannel = irq;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = prio;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);*/
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
#else
|
||||
HAL_NVIC_SetPriority(irq, prio, 0);
|
||||
HAL_NVIC_EnableIRQ(irq);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -85,14 +85,17 @@ uavcan::uint64_t time_utc = 0;
|
||||
|
||||
static void nvicEnableVector(IRQn_Type irq, uint8_t prio)
|
||||
{
|
||||
/*NVIC_InitTypeDef NVIC_InitStructure;
|
||||
#if !defined (USE_HAL_DRIVER)
|
||||
NVIC_InitTypeDef NVIC_InitStructure;
|
||||
NVIC_InitStructure.NVIC_IRQChannel = irq;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = prio;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);*/
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
#else
|
||||
HAL_NVIC_SetPriority(irq, prio, 0);
|
||||
HAL_NVIC_EnableIRQ(irq);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user