Skip to content

Commit 231b221

Browse files
Merge pull request #134 from UAVCAN/master_upstream_nuttx_irq_changes
Support upstream NuttX IRQ API changes
2 parents 883cba9 + 7764a92 commit 231b221

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

libuavcan_drivers/stm32/driver/src/internal.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# define UAVCAN_STM32_IRQ_PROLOGUE() CH_IRQ_PROLOGUE()
4444
# define UAVCAN_STM32_IRQ_EPILOGUE() CH_IRQ_EPILOGUE()
4545
#elif UAVCAN_STM32_NUTTX
46-
# define UAVCAN_STM32_IRQ_HANDLER(id) int id(int irq, FAR void* context)
46+
# define UAVCAN_STM32_IRQ_HANDLER(id) int id(int irq, FAR void* context, FAR void *arg)
4747
# define UAVCAN_STM32_IRQ_PROLOGUE()
4848
# define UAVCAN_STM32_IRQ_EPILOGUE() return 0;
4949
#else

libuavcan_drivers/stm32/driver/src/uc_stm32_can.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
# endif
5151
extern "C"
5252
{
53-
static int can1_irq(const int irq, void*);
53+
static int can1_irq(const int irq, void*, void*);
5454
#if UAVCAN_STM32_NUM_IFACES > 1
55-
static int can2_irq(const int irq, void*);
55+
static int can2_irq(const int irq, void*, void*);
5656
#endif
5757
}
5858
#endif
@@ -1010,7 +1010,7 @@ void CanDriver::initOnce()
10101010
#if UAVCAN_STM32_NUTTX
10111011
# define IRQ_ATTACH(irq, handler) \
10121012
{ \
1013-
const int res = irq_attach(irq, handler); \
1013+
const int res = irq_attach(irq, handler, NULL); \
10141014
(void)res; \
10151015
assert(res >= 0); \
10161016
up_enable_irq(irq); \
@@ -1119,7 +1119,7 @@ extern "C"
11191119

11201120
#if UAVCAN_STM32_NUTTX
11211121

1122-
static int can1_irq(const int irq, void*)
1122+
static int can1_irq(const int irq, void*, void*)
11231123
{
11241124
if (irq == STM32_IRQ_CAN1TX)
11251125
{
@@ -1142,7 +1142,7 @@ static int can1_irq(const int irq, void*)
11421142

11431143
# if UAVCAN_STM32_NUM_IFACES > 1
11441144

1145-
static int can2_irq(const int irq, void*)
1145+
static int can2_irq(const int irq, void*, void*)
11461146
{
11471147
if (irq == STM32_IRQ_CAN2TX)
11481148
{

libuavcan_drivers/stm32/driver/src/uc_stm32_clock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ void init()
151151
# if UAVCAN_STM32_NUTTX
152152

153153
// Attach IRQ
154-
irq_attach(TIMX_IRQn, &TIMX_IRQHandler);
154+
irq_attach(TIMX_IRQn, &TIMX_IRQHandler, NULL);
155155

156156
// Power-on and reset
157157
modifyreg32(STM32_RCC_APB1ENR, 0, TIMX_RCC_ENR_MASK);

0 commit comments

Comments
 (0)