From 3129c7536e7feacfad4cbf74dc47c27c609fbfa1 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 27 Feb 2017 09:23:50 -0600 Subject: [PATCH] CC3000: Add interrupt argument to all CC3000 interrupts. --- configs/freedom-kl25z/src/kl_wifi.c | 8 ++++++-- configs/nucleo-f4x1re/src/stm32_wireless.c | 8 ++++++-- configs/nucleo-l476rg/src/stm32_wireless.c | 8 ++++++-- configs/spark/src/stm32_wireless.c | 8 ++++++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/configs/freedom-kl25z/src/kl_wifi.c b/configs/freedom-kl25z/src/kl_wifi.c index 5687388571..0bf17b1c8a 100644 --- a/configs/freedom-kl25z/src/kl_wifi.c +++ b/configs/freedom-kl25z/src/kl_wifi.c @@ -121,7 +121,8 @@ struct kl_config_s * probe - Debug support */ -static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler); +static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler, + FAR void *arg); static void wl_enable_irq(FAR struct cc3000_config_s *state, bool enable); static void wl_clear_irq(FAR struct cc3000_config_s *state); static void wl_select(FAR struct cc3000_config_s *state, bool enable); @@ -160,6 +161,7 @@ static struct kl_config_s g_cc3000_info = .dev.probe = probe, /* This is used for debugging */ #endif .handler = NULL, + .arg = NULL, }; /**************************************************************************** @@ -182,13 +184,15 @@ static struct kl_config_s g_cc3000_info = * probe - Debug support */ -static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler) +static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler, + FAR void *arg) { FAR struct kl_config_s *priv = (FAR struct kl_config_s *)state; /* Just save the handler for use when the interrupt is enabled */ priv->handler = handler; + priv->arg = arg; return OK; } diff --git a/configs/nucleo-f4x1re/src/stm32_wireless.c b/configs/nucleo-f4x1re/src/stm32_wireless.c index 0cd4e2e066..32cfd31775 100644 --- a/configs/nucleo-f4x1re/src/stm32_wireless.c +++ b/configs/nucleo-f4x1re/src/stm32_wireless.c @@ -118,7 +118,8 @@ struct stm32_config_s * wl_read_irq - Return the state of the interrupt GPIO input */ -static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler); +static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler, + FAR void *arg); static void wl_enable_irq(FAR struct cc3000_config_s *state, bool enable); static void wl_clear_irq(FAR struct cc3000_config_s *state); static void wl_select(FAR struct cc3000_config_s *state, bool enable); @@ -157,6 +158,7 @@ static struct stm32_config_s g_cc3000_info = .dev.probe = probe, /* This is used for debugging */ #endif .handler = NULL, + .arg = NULL, }; /**************************************************************************** @@ -175,13 +177,15 @@ static struct stm32_config_s g_cc3000_info = * pendown - Return the state of the pen down GPIO input */ -static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler) +static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler, + FAR void *arg) { FAR struct stm32_config_s *priv = (FAR struct stm32_config_s *)state; /* Just save the handler for use when the interrupt is enabled */ priv->handler = handler; + priv->arg = arg; return OK; } diff --git a/configs/nucleo-l476rg/src/stm32_wireless.c b/configs/nucleo-l476rg/src/stm32_wireless.c index c17da677fe..f28f8d3383 100644 --- a/configs/nucleo-l476rg/src/stm32_wireless.c +++ b/configs/nucleo-l476rg/src/stm32_wireless.c @@ -118,7 +118,8 @@ struct stm32_config_s * wl_read_irq - Return the state of the interrupt GPIO input */ -static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler); +static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler, + FAR void *arg); static void wl_enable_irq(FAR struct cc3000_config_s *state, bool enable); static void wl_clear_irq(FAR struct cc3000_config_s *state); static void wl_select(FAR struct cc3000_config_s *state, bool enable); @@ -157,6 +158,7 @@ static struct stm32_config_s g_cc3000_info = .dev.probe = probe, /* This is used for debugging */ #endif .handler = NULL, + .arg = NULL, }; /**************************************************************************** @@ -175,13 +177,15 @@ static struct stm32_config_s g_cc3000_info = * pendown - Return the state of the pen down GPIO input */ -static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler) +static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler, + FAR void *arg) { FAR struct stm32_config_s *priv = (FAR struct stm32_config_s *)state; /* Just save the handler for use when the interrupt is enabled */ priv->handler = handler; + priv->arg = arg; return OK; } diff --git a/configs/spark/src/stm32_wireless.c b/configs/spark/src/stm32_wireless.c index 2d1f6855d8..9e51affd85 100644 --- a/configs/spark/src/stm32_wireless.c +++ b/configs/spark/src/stm32_wireless.c @@ -118,7 +118,8 @@ struct stm32_config_s * wl_read_irq - Return the state of the interrupt GPIO input */ -static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler); +static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler, + FAR void *arg); static void wl_enable_irq(FAR struct cc3000_config_s *state, bool enable); static void wl_clear_irq(FAR struct cc3000_config_s *state); static void wl_select(FAR struct cc3000_config_s *state, bool enable); @@ -157,6 +158,7 @@ static struct stm32_config_s g_cc3000_info = .dev.probe = probe, /* This is used for debugging */ #endif .handler = NULL, + .arg = NULL, }; /**************************************************************************** @@ -175,13 +177,15 @@ static struct stm32_config_s g_cc3000_info = * pendown - Return the state of the pen down GPIO input */ -static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler) +static int wl_attach_irq(FAR struct cc3000_config_s *state, xcpt_t handler, + FAR void *arg) { FAR struct stm32_config_s *priv = (FAR struct stm32_config_s *)state; /* Just save the handler for use when the interrupt is enabled */ priv->handler = handler; + priv->arg = arg; return OK; }