Update stm32 drivers to ChibiOS 3.0

This commit is contained in:
Antoine Albertelli
2015-09-03 17:41:01 +02:00
parent 4dff5c2223
commit 73242f39c6
2 changed files with 7 additions and 7 deletions
@@ -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