diff --git a/configs/clicker2-stm32/src/stm32_mrf24j40.c b/configs/clicker2-stm32/src/stm32_mrf24j40.c index 8d28c548548..12131190fbe 100644 --- a/configs/clicker2-stm32/src/stm32_mrf24j40.c +++ b/configs/clicker2-stm32/src/stm32_mrf24j40.c @@ -47,9 +47,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "stm32_gpio.h" #include "stm32_exti.h" @@ -120,7 +120,7 @@ static int stm32_attach_irq(FAR const struct mrf24j40_lower_s *lower, xcpt_t handler); static void stm32_enable_irq(FAR const struct mrf24j40_lower_s *lower, int state); -static int stm32_mrf24j40_devsetup(FAR struct stm32_priv_s *priv)' +static int stm32_mrf24j40_devsetup(FAR struct stm32_priv_s *priv); /**************************************************************************** * Private Data @@ -172,12 +172,12 @@ static struct stm32_priv_s g_mrf24j40_mb2_priv = * irq_enable - Enable or disable the GPIO interrupt */ -static int stm32_attach_irq(FAR struct mrf24j40_lower_s *lower, +static int stm32_attach_irq(FAR const struct mrf24j40_lower_s *lower, xcpt_t handler) { - FAR struct stm32_priv_s *priv = (FAR struct mrf24j40_lower_s *)lower; + FAR struct stm32_priv_s *priv = (FAR struct stm32_priv_s *)lower; - DEBUASSERT(priv != NULL); + DEBUGASSERT(priv != NULL); /* Just save the handler for use when the interrupt is enabled */ @@ -185,9 +185,9 @@ static int stm32_attach_irq(FAR struct mrf24j40_lower_s *lower, return OK; } -static void stm32_enable_irq(FAR struct mrf24j40_lower_s *lower, int state) +static void stm32_enable_irq(FAR const struct mrf24j40_lower_s *lower, int state) { - FAR struct stm32_priv_s *priv = (FAR struct mrf24j40_lower_s *)lower; + FAR struct stm32_priv_s *priv = (FAR struct stm32_priv_s *)lower; /* The caller should not attempt to enable interrupts if the handler * has not yet been 'attached' @@ -201,7 +201,7 @@ static void stm32_enable_irq(FAR struct mrf24j40_lower_s *lower, int state) if (state != 0) { (void)stm32_gpiosetevent(priv->intcfg, true, true, true, - priv->handler, lower); + priv->handler, NULL); } else { @@ -230,6 +230,8 @@ static int stm32_mrf24j40_devsetup(FAR struct stm32_priv_s *priv) #endif FAR struct spi_dev_s *spi; + int ret; + /* Configure the interrupt pin */ stm32_configgpio(priv->intcfg);