mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
CC3000: Add interrupt argument to all CC3000 interrupts.
This commit is contained in:
@@ -121,7 +121,8 @@ struct kl_config_s
|
|||||||
* probe - Debug support
|
* 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_enable_irq(FAR struct cc3000_config_s *state, bool enable);
|
||||||
static void wl_clear_irq(FAR struct cc3000_config_s *state);
|
static void wl_clear_irq(FAR struct cc3000_config_s *state);
|
||||||
static void wl_select(FAR struct cc3000_config_s *state, bool enable);
|
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 */
|
.dev.probe = probe, /* This is used for debugging */
|
||||||
#endif
|
#endif
|
||||||
.handler = NULL,
|
.handler = NULL,
|
||||||
|
.arg = NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -182,13 +184,15 @@ static struct kl_config_s g_cc3000_info =
|
|||||||
* probe - Debug support
|
* 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;
|
FAR struct kl_config_s *priv = (FAR struct kl_config_s *)state;
|
||||||
|
|
||||||
/* Just save the handler for use when the interrupt is enabled */
|
/* Just save the handler for use when the interrupt is enabled */
|
||||||
|
|
||||||
priv->handler = handler;
|
priv->handler = handler;
|
||||||
|
priv->arg = arg;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,8 @@ struct stm32_config_s
|
|||||||
* wl_read_irq - Return the state of the interrupt GPIO input
|
* 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_enable_irq(FAR struct cc3000_config_s *state, bool enable);
|
||||||
static void wl_clear_irq(FAR struct cc3000_config_s *state);
|
static void wl_clear_irq(FAR struct cc3000_config_s *state);
|
||||||
static void wl_select(FAR struct cc3000_config_s *state, bool enable);
|
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 */
|
.dev.probe = probe, /* This is used for debugging */
|
||||||
#endif
|
#endif
|
||||||
.handler = NULL,
|
.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
|
* 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;
|
FAR struct stm32_config_s *priv = (FAR struct stm32_config_s *)state;
|
||||||
|
|
||||||
/* Just save the handler for use when the interrupt is enabled */
|
/* Just save the handler for use when the interrupt is enabled */
|
||||||
|
|
||||||
priv->handler = handler;
|
priv->handler = handler;
|
||||||
|
priv->arg = arg;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,8 @@ struct stm32_config_s
|
|||||||
* wl_read_irq - Return the state of the interrupt GPIO input
|
* 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_enable_irq(FAR struct cc3000_config_s *state, bool enable);
|
||||||
static void wl_clear_irq(FAR struct cc3000_config_s *state);
|
static void wl_clear_irq(FAR struct cc3000_config_s *state);
|
||||||
static void wl_select(FAR struct cc3000_config_s *state, bool enable);
|
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 */
|
.dev.probe = probe, /* This is used for debugging */
|
||||||
#endif
|
#endif
|
||||||
.handler = NULL,
|
.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
|
* 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;
|
FAR struct stm32_config_s *priv = (FAR struct stm32_config_s *)state;
|
||||||
|
|
||||||
/* Just save the handler for use when the interrupt is enabled */
|
/* Just save the handler for use when the interrupt is enabled */
|
||||||
|
|
||||||
priv->handler = handler;
|
priv->handler = handler;
|
||||||
|
priv->arg = arg;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,8 @@ struct stm32_config_s
|
|||||||
* wl_read_irq - Return the state of the interrupt GPIO input
|
* 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_enable_irq(FAR struct cc3000_config_s *state, bool enable);
|
||||||
static void wl_clear_irq(FAR struct cc3000_config_s *state);
|
static void wl_clear_irq(FAR struct cc3000_config_s *state);
|
||||||
static void wl_select(FAR struct cc3000_config_s *state, bool enable);
|
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 */
|
.dev.probe = probe, /* This is used for debugging */
|
||||||
#endif
|
#endif
|
||||||
.handler = NULL,
|
.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
|
* 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;
|
FAR struct stm32_config_s *priv = (FAR struct stm32_config_s *)state;
|
||||||
|
|
||||||
/* Just save the handler for use when the interrupt is enabled */
|
/* Just save the handler for use when the interrupt is enabled */
|
||||||
|
|
||||||
priv->handler = handler;
|
priv->handler = handler;
|
||||||
|
priv->arg = arg;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user