STM32 driver: supporting ChibiOS RT kernel v4

This commit is contained in:
Pavel Kirienko
2016-11-29 13:48:54 +03:00
parent 7dbd763ae6
commit 773104ed4e
@@ -20,7 +20,7 @@
# define TIMX_INPUT_CLOCK STM32_TIMCLK1
# endif
# if (UAVCAN_STM32_CHIBIOS && CH_KERNEL_MAJOR == 3)
# if (UAVCAN_STM32_CHIBIOS && (CH_KERNEL_MAJOR == 3 || CH_KERNEL_MAJOR == 4))
# define TIMX UAVCAN_STM32_GLUE2(STM32_TIM, UAVCAN_STM32_TIMER_NUMBER)
# define TIMX_IRQn UAVCAN_STM32_GLUE3(STM32_TIM, UAVCAN_STM32_TIMER_NUMBER, _NUMBER)
# define TIMX_IRQHandler UAVCAN_STM32_GLUE3(STM32_TIM, UAVCAN_STM32_TIMER_NUMBER, _HANDLER)