CC3000: Add interrupt argument to all CC3000 interrupts.

This commit is contained in:
Gregory Nutt 2017-02-27 09:23:50 -06:00
parent e5be4f7fe2
commit 3129c7536e
4 changed files with 24 additions and 8 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}