mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-06 01:50:36 +08:00
Update stm32 drivers to ChibiOS 3.0
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
* Priority mask for timer and CAN interrupts.
|
||||
*/
|
||||
# ifndef UAVCAN_STM32_IRQ_PRIORITY_MASK
|
||||
# define UAVCAN_STM32_IRQ_PRIORITY_MASK CORTEX_PRIORITY_MASK(CORTEX_MAX_KERNEL_PRIORITY)
|
||||
# define UAVCAN_STM32_IRQ_PRIORITY_MASK CORTEX_PRIO_MASK(CORTEX_MAX_KERNEL_PRIORITY)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,13 +23,13 @@ bool BusEvent::wait(uavcan::MonotonicDuration duration)
|
||||
|
||||
if (msec <= 0)
|
||||
{
|
||||
ret = sem_.waitTimeout(TIME_IMMEDIATE);
|
||||
ret = sem_.wait(TIME_IMMEDIATE);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = sem_.waitTimeout((msec > MaxDelayMSec) ? MS2ST(MaxDelayMSec) : MS2ST(msec));
|
||||
ret = sem_.wait((msec > MaxDelayMSec) ? MS2ST(MaxDelayMSec) : MS2ST(msec));
|
||||
}
|
||||
return ret == RDY_OK;
|
||||
return ret == MSG_OK;
|
||||
}
|
||||
|
||||
void BusEvent::signal()
|
||||
@@ -39,9 +39,9 @@ void BusEvent::signal()
|
||||
|
||||
void BusEvent::signalFromInterrupt()
|
||||
{
|
||||
chSysLockFromIsr();
|
||||
chSysLockFromISR();
|
||||
sem_.signalI();
|
||||
chSysUnlockFromIsr();
|
||||
chSysUnlockFromISR();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -54,7 +54,7 @@ void Mutex::lock()
|
||||
|
||||
void Mutex::unlock()
|
||||
{
|
||||
chibios_rt::BaseThread::unlockMutex();
|
||||
mtx_.unlock();
|
||||
}
|
||||
|
||||
#elif UAVCAN_STM32_NUTTX
|
||||
|
||||
Reference in New Issue
Block a user