From 30c5e78d8f0dd0cdd259ebd13703028aa3d4b967 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Tue, 28 Feb 2017 14:19:55 -1000 Subject: [PATCH 1/3] stm32f7:stm32_exti_pwr irq fixes --- arch/arm/src/stm32f7/stm32_exti_pwr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/stm32f7/stm32_exti_pwr.c b/arch/arm/src/stm32f7/stm32_exti_pwr.c index 0dafb120ba..54239c777a 100644 --- a/arch/arm/src/stm32f7/stm32_exti_pwr.c +++ b/arch/arm/src/stm32f7/stm32_exti_pwr.c @@ -89,7 +89,7 @@ static void *g_callback_arg; * ****************************************************************************/ -static int stm32_exti_pvd_isr(int irq, void *context, FAR void *arg) +static int stm32_exti_pvd_isr(int irq, void *context, void *arg) { int ret = OK; @@ -130,7 +130,7 @@ static int stm32_exti_pvd_isr(int irq, void *context, FAR void *arg) ****************************************************************************/ xcpt_t stm32_exti_pvd(bool risingedge, bool fallingedge, bool event, - xcpt_t func) + xcpt_t func, void *arg) { xcpt_t oldhandler; From 964a1abadae9b1585d18eb880b167215746c0a3e Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Tue, 28 Feb 2017 14:20:45 -1000 Subject: [PATCH 2/3] stm32f7:stm32_sdmmc irq fixes --- arch/arm/src/stm32f7/stm32_sdmmc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/src/stm32f7/stm32_sdmmc.c b/arch/arm/src/stm32f7/stm32_sdmmc.c index 34a8bdb3d8..e08a08cc20 100644 --- a/arch/arm/src/stm32f7/stm32_sdmmc.c +++ b/arch/arm/src/stm32f7/stm32_sdmmc.c @@ -481,10 +481,10 @@ static int stm32_sdmmc2_interrupt(int irq, void *context, void *arg); #ifdef CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE #ifdef CONFIG_STM32F7_SDMMC1 -static int stm32_sdmmc1_rdyinterrupt(int irq, void *context); +static int stm32_sdmmc1_rdyinterrupt(int irq, void *context, void *arg); #endif #ifdef CONFIG_STM32F7_SDMMC2 -static int stm32_sdmmc2_rdyinterrupt(int irq, void *context); +static int stm32_sdmmc2_rdyinterrupt(int irq, void *context, void *arg); #endif #endif @@ -846,14 +846,14 @@ static void stm32_configwaitints(struct stm32_dev_s *priv, uint32_t waitmask, /* Arm the SDMMC_D Ready and install Isr */ - stm32_gpiosetevent(pinset, true, false, false, priv->wrchandler); + stm32_gpiosetevent(pinset, true, false, false, priv->wrchandler, priv); } /* Disarm SDMMC_D ready */ if ((wkupevent & SDIOWAIT_WRCOMPLETE) != 0) { - stm32_gpiosetevent(priv->d0_gpio, false, false, false , NULL); + stm32_gpiosetevent(priv->d0_gpio, false, false, false , NULL, NULL); stm32_configgpio(priv->d0_gpio); } #endif @@ -1506,18 +1506,18 @@ static void stm32_endtransfer(struct stm32_dev_s *priv, #ifdef CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE # if defined(CONFIG_STM32F7_SDMMC1) -static int stm32_sdmmc1_rdyinterrupt(int irq, void *context) +static int stm32_sdmmc1_rdyinterrupt(int irq, void *context, void *arg) { - struct stm32_dev_s *priv = &g_sdmmcdev1; + struct stm32_dev_s *priv = (struct stm32_dev_s *)arg; stm32_endwait(priv, SDIOWAIT_WRCOMPLETE); return OK; } # endif # if defined(CONFIG_STM32F7_SDMMC2) -static int stm32_sdmmc2_rdyinterrupt(int irq, void *context) +static int stm32_sdmmc2_rdyinterrupt(int irq, void *context, void *arg) { - struct stm32_dev_s *priv = &g_sdmmcdev2; + struct stm32_dev_s *priv = struct stm32_dev_s *)arg; stm32_endwait(priv, SDIOWAIT_WRCOMPLETE); return OK; } From 2ee99c9d4ef381744b804b1ff68d058d47d8e042 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Tue, 28 Feb 2017 14:29:06 -1000 Subject: [PATCH 3/3] STM32F7:stm32_tim irq fixes --- arch/arm/src/stm32f7/stm32_tim.c | 2 +- arch/arm/src/stm32f7/stm32_tim.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/stm32f7/stm32_tim.c b/arch/arm/src/stm32f7/stm32_tim.c index 7ded94ee33..86ea856be2 100644 --- a/arch/arm/src/stm32f7/stm32_tim.c +++ b/arch/arm/src/stm32f7/stm32_tim.c @@ -488,7 +488,7 @@ static void stm32_tim_setperiod(FAR struct stm32_tim_dev_s *dev, } static int stm32_tim_setisr(FAR struct stm32_tim_dev_s *dev, - int (*handler)(int irq, void *context), + xcpt_t handler, int source) { int vectorno; diff --git a/arch/arm/src/stm32f7/stm32_tim.h b/arch/arm/src/stm32f7/stm32_tim.h index c4561288a9..6db4339284 100644 --- a/arch/arm/src/stm32f7/stm32_tim.h +++ b/arch/arm/src/stm32f7/stm32_tim.h @@ -167,7 +167,8 @@ struct stm32_tim_ops_s /* Timer interrupts */ - int (*setisr)(FAR struct stm32_tim_dev_s *dev, int (*handler)(int irq, void *context), int source); + int (*setisr)(FAR struct stm32_tim_dev_s *dev, xcpt_t handler, + int source); void (*enableint)(FAR struct stm32_tim_dev_s *dev, int source); void (*disableint)(FAR struct stm32_tim_dev_s *dev, int source); void (*ackint)(FAR struct stm32_tim_dev_s *dev, int source);