mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
irq_dispatch: Add argument pointer to irq_dispatch
Provide a user defined callback context for irq's, such that when registering a callback users can provide a pointer that will get passed back when the isr is called.
This commit is contained in:
committed by
Gregory Nutt
parent
f97a99e051
commit
b3222bbc8a
@@ -112,7 +112,7 @@ static xcpt_t board_button_irqx(gpio_pinset_t pinset, int irq,
|
||||
/* Configure the interrupt */
|
||||
|
||||
sam_gpioirq(pinset);
|
||||
(void)irq_attach(irq, irqhandler);
|
||||
(void)irq_attach(irq, irqhandler, NULL);
|
||||
sam_gpioirqenable(irq);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -347,7 +347,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable)
|
||||
sam_gpioirq(pinset);
|
||||
|
||||
phyinfo("Attach IRQ%d\n", irq);
|
||||
(void)irq_attach(irq, handler);
|
||||
(void)irq_attach(irq, handler, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -99,7 +99,7 @@ struct sam_hsmci_state_s
|
||||
/* HSCMI device state */
|
||||
|
||||
#ifdef CONFIG_SAMV7_HSMCI0
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs);
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs, FAR void *arg);
|
||||
|
||||
static struct sam_hsmci_state_s g_hsmci0 =
|
||||
{
|
||||
@@ -164,7 +164,7 @@ static int sam_hsmci_cardetect(struct sam_hsmci_state_s *state)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SAMV7_HSMCI0
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs)
|
||||
static int sam_hsmci0_cardetect(int irq, void *regs, FAR void *arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -263,7 +263,7 @@ int sam_hsmci_initialize(int slotno, int minor)
|
||||
/* Configure card detect interrupts */
|
||||
|
||||
sam_gpioirq(state->cdcfg);
|
||||
(void)irq_attach(state->irq, state->handler);
|
||||
(void)irq_attach(state->irq, state->handler, NULL);
|
||||
|
||||
/* Then inform the HSMCI driver if there is or is not a card in the slot. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user