mirror of
https://github.com/apache/nuttx.git
synced 2026-05-18 00:34:10 +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
@@ -110,28 +110,28 @@ static int up_attach(struct uart_dev_s *dev);
|
||||
static void up_detach(struct uart_dev_s *dev);
|
||||
static int uart_interrupt(struct uart_dev_s *dev);
|
||||
#ifdef CONFIG_A1X_UART0
|
||||
static int uart0_interrupt(int irq, void *context);
|
||||
static int uart0_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_A1X_UART1
|
||||
static int uart1_interrupt(int irq, void *context);
|
||||
static int uart1_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_A1X_UART2
|
||||
static int uart2_interrupt(int irq, void *context);
|
||||
static int uart2_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_A1X_UART3
|
||||
static int uart3_interrupt(int irq, void *context);
|
||||
static int uart3_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_A1X_UART4
|
||||
static int uart4_interrupt(int irq, void *context);
|
||||
static int uart4_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_A1X_UART5
|
||||
static int uart5_interrupt(int irq, void *context);
|
||||
static int uart5_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_A1X_UART6
|
||||
static int uart6_interrupt(int irq, void *context);
|
||||
static int uart6_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_A1X_UART7
|
||||
static int uart7_interrupt(int irq, void *context);
|
||||
static int uart7_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
static int up_ioctl(struct file *filep, int cmd, unsigned long arg);
|
||||
static int up_receive(struct uart_dev_s *dev, uint32_t *status);
|
||||
@@ -1068,7 +1068,7 @@ static int up_attach(struct uart_dev_s *dev)
|
||||
|
||||
/* Attach and enable the IRQ */
|
||||
|
||||
ret = irq_attach(priv->irq, priv->handler);
|
||||
ret = irq_attach(priv->irq, priv->handler, NULL);
|
||||
if (ret == OK)
|
||||
{
|
||||
/* Enable the interrupt (RX and TX interrupts are still disabled
|
||||
@@ -1202,56 +1202,56 @@ static int uart_interrupt(struct uart_dev_s *dev)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_A1X_UART0
|
||||
static int uart0_interrupt(int irq, void *context)
|
||||
static int uart0_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return uart_interrupt(&g_uart0port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_A1X_UART1
|
||||
static int uart1_interrupt(int irq, void *context)
|
||||
static int uart1_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return uart_interrupt(&g_uart1port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_A1X_UART2
|
||||
static int uart2_interrupt(int irq, void *context)
|
||||
static int uart2_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return uart_interrupt(&g_uart2port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_A1X_UART3
|
||||
static int uart3_interrupt(int irq, void *context)
|
||||
static int uart3_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return uart_interrupt(&g_uart3port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_A1X_UART4
|
||||
static int uart4_interrupt(int irq, void *context)
|
||||
static int uart4_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return uart_interrupt(&g_uart4port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_A1X_UART5
|
||||
static int uart5_interrupt(int irq, void *context)
|
||||
static int uart5_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return uart_interrupt(&g_uart5port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_A1X_UART6
|
||||
static int uart6_interrupt(int irq, void *context)
|
||||
static int uart6_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return uart_interrupt(&g_uart6port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_A1X_UART7
|
||||
static int uart7_interrupt(int irq, void *context)
|
||||
static int uart7_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return uart_interrupt(&g_uart7port);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int a1x_timerisr(int irq, uint32_t *regs)
|
||||
static int a1x_timerisr(int irq, uint32_t *regs, void *arg)
|
||||
{
|
||||
/* Only a TIMER0 interrupt is expected here */
|
||||
|
||||
@@ -138,7 +138,7 @@ void arm_timer_initialize(void)
|
||||
|
||||
/* Attach the timer interrupt vector */
|
||||
|
||||
(void)irq_attach(A1X_IRQ_TIMER0, (xcpt_t)a1x_timerisr);
|
||||
(void)irq_attach(A1X_IRQ_TIMER0, (xcpt_t)a1x_timerisr, NULL);
|
||||
|
||||
/* Enable interrupts from the TIMER 0 port */
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int up_hardfault(int irq, FAR void *context)
|
||||
int up_hardfault(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
uint32_t *regs = (uint32_t *)context;
|
||||
|
||||
@@ -115,7 +115,7 @@ int up_hardfault(int irq, FAR void *context)
|
||||
if (insn == INSN_SVC0)
|
||||
{
|
||||
hfinfo("Forward SVCall\n");
|
||||
return up_svcall(irq, context);
|
||||
return up_svcall(irq, context, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ static void dispatch_syscall(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int up_svcall(int irq, FAR void *context)
|
||||
int up_svcall(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
uint32_t *regs = (uint32_t *)context;
|
||||
uint32_t cmd;
|
||||
|
||||
@@ -202,7 +202,7 @@ int up_cpu_paused(int cpu)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int arm_pause_handler(int irq, FAR void *context)
|
||||
int arm_pause_handler(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
int cpu = this_cpu();
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ static inline void arm_registerdump(FAR struct tcb_s *tcb)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int arm_start_handler(int irq, FAR void *context)
|
||||
int arm_start_handler(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
FAR struct tcb_s *tcb = this_task();
|
||||
|
||||
|
||||
@@ -124,8 +124,8 @@ void arm_gic0_initialize(void)
|
||||
#ifdef CONFIG_SMP
|
||||
/* Attach SGI interrupt handlers. This attaches the handler for all CPUs. */
|
||||
|
||||
DEBUGVERIFY(irq_attach(GIC_IRQ_SGI1, arm_start_handler));
|
||||
DEBUGVERIFY(irq_attach(GIC_IRQ_SGI2, arm_pause_handler));
|
||||
DEBUGVERIFY(irq_attach(GIC_IRQ_SGI1, arm_start_handler, NULL));
|
||||
DEBUGVERIFY(irq_attach(GIC_IRQ_SGI2, arm_pause_handler, NULL));
|
||||
#endif
|
||||
|
||||
arm_gic_dump("Exit arm_gic0_initialize", true, 0);
|
||||
|
||||
@@ -759,7 +759,7 @@ uint32_t *arm_decodeirq(uint32_t *regs);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
int arm_start_handler(int irq, FAR void *context);
|
||||
int arm_start_handler(int irq, FAR void *context, FAR void *arg);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -783,7 +783,7 @@ int arm_start_handler(int irq, FAR void *context);
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
int arm_pause_handler(int irq, FAR void *context);
|
||||
int arm_pause_handler(int irq, FAR void *context, FAR void *arg);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int up_hardfault(int irq, FAR void *context)
|
||||
int up_hardfault(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG_HARDFAULT) || !defined(CONFIG_ARMV7M_USEBASEPRI)
|
||||
uint32_t *regs = (uint32_t *)context;
|
||||
@@ -124,7 +124,7 @@ int up_hardfault(int irq, FAR void *context)
|
||||
if (insn == INSN_SVC0)
|
||||
{
|
||||
hfalert("Forward SVCall\n");
|
||||
return up_svcall(irq, context);
|
||||
return up_svcall(irq, context, arg);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int up_memfault(int irq, FAR void *context)
|
||||
int up_memfault(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
/* Dump some memory management fault info */
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ static void dispatch_syscall(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int up_svcall(int irq, FAR void *context)
|
||||
int up_svcall(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
uint32_t *regs = (uint32_t *)context;
|
||||
uint32_t cmd;
|
||||
|
||||
@@ -401,7 +401,7 @@ static void c5471_txstatus(struct c5471_driver_s *priv);
|
||||
static void c5471_txdone(struct c5471_driver_s *priv);
|
||||
|
||||
static void c5471_interrupt_work(FAR void *arg);
|
||||
static int c5471_interrupt(int irq, FAR void *context);
|
||||
static int c5471_interrupt(int irq, FAR void *context, FAR void *arg);
|
||||
|
||||
/* Watchdog timer expirations */
|
||||
|
||||
@@ -1634,7 +1634,7 @@ static void c5471_interrupt_work(FAR void *arg)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int c5471_interrupt(int irq, FAR void *context)
|
||||
static int c5471_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
#if CONFIG_C5471_NET_NINTERFACES == 1
|
||||
register struct c5471_driver_s *priv = &g_c5471[0];
|
||||
@@ -2449,7 +2449,7 @@ void up_netinitialize(void)
|
||||
{
|
||||
/* Attach the IRQ to the driver */
|
||||
|
||||
if (irq_attach(C5471_IRQ_ETHER, c5471_interrupt))
|
||||
if (irq_attach(C5471_IRQ_ETHER, c5471_interrupt, NULL))
|
||||
{
|
||||
/* We could not attach the ISR to the ISR */
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ static int up_setup(struct uart_dev_s *dev);
|
||||
static void up_shutdown(struct uart_dev_s *dev);
|
||||
static int up_attach(struct uart_dev_s *dev);
|
||||
static void up_detach(struct uart_dev_s *dev);
|
||||
static int up_interrupt(int irq, void *context);
|
||||
static int up_interrupt(int irq, void *context, FAR void *arg);
|
||||
static int up_ioctl(struct file *filep, int cmd, unsigned long arg);
|
||||
static int up_receive(struct uart_dev_s *dev, unsigned int *status);
|
||||
static void up_rxint(struct uart_dev_s *dev, bool enable);
|
||||
@@ -491,7 +491,7 @@ static int up_attach(struct uart_dev_s *dev)
|
||||
|
||||
/* Attach and enable the IRQ */
|
||||
|
||||
ret = irq_attach(priv->irq, up_interrupt);
|
||||
ret = irq_attach(priv->irq, up_interrupt, NULL);
|
||||
if (ret == OK)
|
||||
{
|
||||
/* Enable the interrupt (RX and TX interrupts are still disabled
|
||||
@@ -534,7 +534,7 @@ static void up_detach(struct uart_dev_s *dev)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int up_interrupt(int irq, void *context)
|
||||
static int up_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
struct uart_dev_s *dev = NULL;
|
||||
struct up_dev_s *priv;
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int c5471_timerisr(int irq, uint32_t *regs)
|
||||
static int c5471_timerisr(int irq, uint32_t *regs, FAR void *arg)
|
||||
{
|
||||
/* Process timer interrupt */
|
||||
|
||||
@@ -118,6 +118,6 @@ void arm_timer_initialize(void)
|
||||
|
||||
/* Attach and enable the timer interrupt */
|
||||
|
||||
irq_attach(C5471_IRQ_SYSTIMER, (xcpt_t)c5471_timerisr);
|
||||
irq_attach(C5471_IRQ_SYSTIMER, (xcpt_t)c5471_timerisr, NULL);
|
||||
up_enable_irq(C5471_IRQ_SYSTIMER);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
static inline unsigned int wdt_prescaletoptv(unsigned int prescale);
|
||||
|
||||
static int wdt_setusec(uint32_t usec);
|
||||
static int wdt_interrupt(int irq, void *context);
|
||||
static int wdt_interrupt(int irq, void *context, FAR void *arg);
|
||||
|
||||
static int wdt_open(struct file *filep);
|
||||
static int wdt_close(struct file *filep);
|
||||
@@ -232,7 +232,7 @@ static int wdt_setusec(uint32_t usec)
|
||||
* Name: wdt_interrupt
|
||||
****************************************************************************/
|
||||
|
||||
static int wdt_interrupt(int irq, void *context)
|
||||
static int wdt_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
wdinfo("expired\n");
|
||||
|
||||
@@ -382,7 +382,7 @@ int up_wdtinit(void)
|
||||
|
||||
/* Request the interrupt. */
|
||||
|
||||
ret = irq_attach(C5471_IRQ_WATCHDOG, wdt_interrupt);
|
||||
ret = irq_attach(C5471_IRQ_WATCHDOG, wdt_interrupt, NULL);
|
||||
if (ret)
|
||||
{
|
||||
unregister_driver("/dev/wdt");
|
||||
|
||||
@@ -374,13 +374,13 @@ uint32_t *up_doirq(int irq, uint32_t *regs);
|
||||
|
||||
/* Exception Handlers */
|
||||
|
||||
int up_svcall(int irq, FAR void *context);
|
||||
int up_hardfault(int irq, FAR void *context);
|
||||
int up_svcall(int irq, FAR void *context, FAR void *arg);
|
||||
int up_hardfault(int irq, FAR void *context, FAR void *arg);
|
||||
|
||||
# if defined(CONFIG_ARCH_CORTEXM3) || defined(CONFIG_ARCH_CORTEXM4) || \
|
||||
defined(CONFIG_ARCH_CORTEXM7)
|
||||
|
||||
int up_memfault(int irq, FAR void *context);
|
||||
int up_memfault(int irq, FAR void *context, FAR void *arg);
|
||||
|
||||
# endif /* CONFIG_ARCH_CORTEXM3,4,7 */
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ static int up_setup(struct uart_dev_s *dev);
|
||||
static void up_shutdown(struct uart_dev_s *dev);
|
||||
static int up_attach(struct uart_dev_s *dev);
|
||||
static void up_detach(struct uart_dev_s *dev);
|
||||
static int up_interrupt(int irq, void *context);
|
||||
static int up_interrupt(int irq, void *context, FAR void *arg);
|
||||
static int up_ioctl(struct file *filep, int cmd, unsigned long arg);
|
||||
static int up_receive(struct uart_dev_s *dev, uint32_t *status);
|
||||
static void up_rxint(struct uart_dev_s *dev, bool enable);
|
||||
@@ -430,7 +430,7 @@ static int up_attach(struct uart_dev_s *dev)
|
||||
|
||||
/* Attach and enable the IRQ */
|
||||
|
||||
ret = irq_attach(priv->irq, up_interrupt);
|
||||
ret = irq_attach(priv->irq, up_interrupt, NULL);
|
||||
if (ret == OK)
|
||||
{
|
||||
/* Enable the interrupt (RX and TX interrupts are still disabled
|
||||
@@ -472,7 +472,7 @@ static void up_detach(struct uart_dev_s *dev)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int up_interrupt(int irq, void *context)
|
||||
static int up_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
struct uart_dev_s *dev = NULL;
|
||||
struct up_dev_s *priv;
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int dm320_timerisr(int irq, uint32_t *regs)
|
||||
static int dm320_timerisr(int irq, uint32_t *regs, FAR void *arg)
|
||||
{
|
||||
/* Process timer interrupt */
|
||||
|
||||
@@ -147,7 +147,7 @@ void arm_timer_initialize(void)
|
||||
|
||||
/* Attach and enable the timer interrupt */
|
||||
|
||||
irq_attach(DM320_IRQ_SYSTIMER, (xcpt_t)dm320_timerisr);
|
||||
irq_attach(DM320_IRQ_SYSTIMER, (xcpt_t)dm320_timerisr, NULL);
|
||||
up_enable_irq(DM320_IRQ_SYSTIMER);
|
||||
}
|
||||
|
||||
|
||||
@@ -309,8 +309,8 @@ static void dm320_dispatchrequest(struct dm320_usbdev_s *priv,
|
||||
const struct usb_ctrlreq_s *ctrl);
|
||||
static inline void dm320_ep0setup(struct dm320_usbdev_s *priv);
|
||||
static inline uint32_t dm320_highestpriinterrupt(int intstatus);
|
||||
static int dm320_ctlrinterrupt(int irq, FAR void *context);
|
||||
static int dm320_attachinterrupt(int irq, FAR void *context);
|
||||
static int dm320_ctlrinterrupt(int irq, FAR void *context, FAR void *arg);
|
||||
static int dm320_attachinterrupt(int irq, FAR void *context, FAR void *arg);
|
||||
|
||||
/* Initialization operations */
|
||||
|
||||
@@ -1513,7 +1513,7 @@ static inline uint32_t dm320_highestpriinterrupt(int intstatus)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int dm320_ctlrinterrupt(int irq, FAR void *context)
|
||||
static int dm320_ctlrinterrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
struct dm320_usbdev_s *priv = &g_usbdev;
|
||||
struct dm320_ep_s *privep ;
|
||||
@@ -1680,7 +1680,7 @@ static int dm320_ctlrinterrupt(int irq, FAR void *context)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int dm320_attachinterrupt(int irq, FAR void *context)
|
||||
static int dm320_attachinterrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
struct dm320_usbdev_s *priv = &g_usbdev;
|
||||
uint16_t gio;
|
||||
@@ -2438,7 +2438,7 @@ void up_usbinitialize(void)
|
||||
|
||||
/* Attach host attach GIO interrupt */
|
||||
|
||||
if (irq_attach(IRQ_USBATTACH, dm320_attachinterrupt) != 0)
|
||||
if (irq_attach(IRQ_USBATTACH, dm320_attachinterrupt, NULL) != 0)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(DM320_TRACEERR_ATTACHIRQREG), 0);
|
||||
goto errout;
|
||||
@@ -2448,7 +2448,7 @@ void up_usbinitialize(void)
|
||||
* enabled when the driver is bound
|
||||
*/
|
||||
|
||||
if (irq_attach(DM320_IRQ_USB1, dm320_ctlrinterrupt) != 0)
|
||||
if (irq_attach(DM320_IRQ_USB1, dm320_ctlrinterrupt, NULL) != 0)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(DM320_TRACEERR_COREIRQREG), 0);
|
||||
goto errout;
|
||||
|
||||
@@ -123,7 +123,7 @@ static void adc_hw_reset(struct efm32_dev_s *priv, bool reset);
|
||||
|
||||
/* ADC Interrupt Handler */
|
||||
|
||||
static int adc_interrupt(FAR struct adc_dev_s *dev);
|
||||
static int adc_interrupt(int irq, FAR void * context, FAR struct adc_dev_s *dev);
|
||||
|
||||
/* ADC Driver Methods */
|
||||
|
||||
@@ -1072,7 +1072,7 @@ static int adc_setup(FAR struct adc_dev_s *dev)
|
||||
|
||||
/* Attach the ADC interrupt */
|
||||
|
||||
ret = irq_attach(priv->irq, priv->isr);
|
||||
ret = irq_attach(priv->irq, priv->isr, dev);
|
||||
if (ret == OK)
|
||||
{
|
||||
/* Make sure that the ADC device is in the powered up, reset state */
|
||||
@@ -1180,7 +1180,7 @@ static int adc_ioctl(FAR struct adc_dev_s *dev, int cmd, unsigned long arg)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int adc_interrupt(FAR struct adc_dev_s *dev)
|
||||
static int adc_interrupt(int irq, FAR void * context, FAR struct adc_dev_s *dev)
|
||||
{
|
||||
FAR struct efm32_dev_s *priv = (FAR struct efm32_dev_s *)dev->ad_priv;
|
||||
uint32_t adcsr;
|
||||
|
||||
@@ -204,7 +204,7 @@ efm32_get_descriptor(struct dma_channel_s *dmach, bool alt)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int efm32_dmac_interrupt(int irq, void *context)
|
||||
static int efm32_dmac_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
struct dma_channel_s *dmach;
|
||||
unsigned int chndx;
|
||||
@@ -297,7 +297,7 @@ void weak_function up_dmainitialize(void)
|
||||
|
||||
/* Attach DMA interrupt vector */
|
||||
|
||||
(void)irq_attach(EFM32_IRQ_DMA, efm32_dmac_interrupt);
|
||||
(void)irq_attach(EFM32_IRQ_DMA, efm32_dmac_interrupt, NULL);
|
||||
|
||||
/* Enable the DMA controller */
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ static int efm32_gpio_interrupt(uint32_t mask, void *context)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
static int efm32_even_interrupt(int irq, void *context)
|
||||
static int efm32_even_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_gpio_interrupt(0x00005555, context);
|
||||
}
|
||||
@@ -146,7 +146,7 @@ static int efm32_even_interrupt(int irq, void *context)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
static int efm32_odd_interrupt(int irq, void *context)
|
||||
static int efm32_odd_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_gpio_interrupt(0x0000aaaa, context);
|
||||
}
|
||||
@@ -173,8 +173,8 @@ void efm32_gpioirqinitialize(void)
|
||||
|
||||
/* Attach the even and odd interrupt handlers */
|
||||
|
||||
DEBUGVERIFY(irq_attach(EFM32_IRQ_GPIO_EVEN, efm32_even_interrupt));
|
||||
DEBUGVERIFY(irq_attach(EFM32_IRQ_GPIO_ODD, efm32_odd_interrupt));
|
||||
DEBUGVERIFY(irq_attach(EFM32_IRQ_GPIO_EVEN, efm32_even_interrupt, NULL));
|
||||
DEBUGVERIFY(irq_attach(EFM32_IRQ_GPIO_ODD, efm32_odd_interrupt, NULL));
|
||||
|
||||
/* Enable GPIO even and odd interrupts at the NVIC */
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ struct efm32_i2c_config_s
|
||||
uint32_t scl_pin; /* GPIO configuration for SCL as SCL */
|
||||
uint32_t sda_pin; /* GPIO configuration for SDA as SDA */
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
int (*isr) (int, void *); /* Interrupt handler */
|
||||
int (*isr) (int, void *, void *); /* Interrupt handler */
|
||||
uint32_t irq; /* Event IRQ */
|
||||
#endif
|
||||
};
|
||||
@@ -298,10 +298,10 @@ static int efm32_i2c_isr(struct efm32_i2c_priv_s *priv);
|
||||
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
#ifdef CONFIG_EFM32_I2C0
|
||||
static int efm32_i2c0_isr(int irq, void *context);
|
||||
static int efm32_i2c0_isr(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_EFM32_I2C1
|
||||
static int efm32_i2c1_isr(int irq, void *context);
|
||||
static int efm32_i2c1_isr(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#endif /* !CONFIG_I2C_POLLED */
|
||||
|
||||
@@ -1290,7 +1290,7 @@ done:
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_EFM32_I2C0
|
||||
static int efm32_i2c0_isr(int irq, void *context)
|
||||
static int efm32_i2c0_isr(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_i2c_isr(&efm32_i2c0_priv);
|
||||
}
|
||||
@@ -1305,7 +1305,7 @@ static int efm32_i2c0_isr(int irq, void *context)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_EFM32_I2C1
|
||||
static int efm32_i2c1_isr(int irq, void *context)
|
||||
static int efm32_i2c1_isr(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_i2c_isr(&efm32_i2c1_priv);
|
||||
}
|
||||
@@ -1389,7 +1389,7 @@ static int efm32_i2c_init(FAR struct efm32_i2c_priv_s *priv)
|
||||
/* Attach ISRs */
|
||||
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
irq_attach(priv->config->irq, priv->config->isr);
|
||||
irq_attach(priv->config->irq, priv->config->isr, NULL);
|
||||
up_enable_irq(priv->config->irq);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ static void efm32_dumpnvic(const char *msg, int irq)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
static int efm32_nmi(int irq, FAR void *context)
|
||||
static int efm32_nmi(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! NMI received\n");
|
||||
@@ -171,7 +171,7 @@ static int efm32_nmi(int irq, FAR void *context)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int efm32_busfault(int irq, FAR void *context)
|
||||
static int efm32_busfault(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||
@@ -179,7 +179,7 @@ static int efm32_busfault(int irq, FAR void *context)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int efm32_usagefault(int irq, FAR void *context)
|
||||
static int efm32_usagefault(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||
@@ -187,7 +187,7 @@ static int efm32_usagefault(int irq, FAR void *context)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int efm32_pendsv(int irq, FAR void *context)
|
||||
static int efm32_pendsv(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! PendSV received\n");
|
||||
@@ -195,7 +195,7 @@ static int efm32_pendsv(int irq, FAR void *context)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int efm32_dbgmonitor(int irq, FAR void *context)
|
||||
static int efm32_dbgmonitor(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! Debug Monitor received\n");
|
||||
@@ -203,7 +203,7 @@ static int efm32_dbgmonitor(int irq, FAR void *context)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int efm32_reserved(int irq, FAR void *context)
|
||||
static int efm32_reserved(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! Reserved interrupt\n");
|
||||
@@ -382,8 +382,8 @@ void up_irqinitialize(void)
|
||||
* under certain conditions.
|
||||
*/
|
||||
|
||||
irq_attach(EFM32_IRQ_SVCALL, up_svcall);
|
||||
irq_attach(EFM32_IRQ_HARDFAULT, up_hardfault);
|
||||
irq_attach(EFM32_IRQ_SVCALL, up_svcall, NULL);
|
||||
irq_attach(EFM32_IRQ_HARDFAULT, up_hardfault, NULL);
|
||||
|
||||
/* Set the priority of the SVCall interrupt */
|
||||
|
||||
@@ -396,22 +396,22 @@ void up_irqinitialize(void)
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARM_MPU
|
||||
irq_attach(EFM32_IRQ_MEMFAULT, up_memfault);
|
||||
irq_attach(EFM32_IRQ_MEMFAULT, up_memfault, NULL);
|
||||
up_enable_irq(EFM32_IRQ_MEMFAULT);
|
||||
#endif
|
||||
|
||||
/* Attach all other processor exceptions (except reset and sys tick) */
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
irq_attach(EFM32_IRQ_NMI, efm32_nmi);
|
||||
irq_attach(EFM32_IRQ_NMI, efm32_nmi, NULL);
|
||||
#ifndef CONFIG_ARM_MPU
|
||||
irq_attach(EFM32_IRQ_MEMFAULT, up_memfault);
|
||||
irq_attach(EFM32_IRQ_MEMFAULT, up_memfault, NULL);
|
||||
#endif
|
||||
irq_attach(EFM32_IRQ_BUSFAULT, efm32_busfault);
|
||||
irq_attach(EFM32_IRQ_USAGEFAULT, efm32_usagefault);
|
||||
irq_attach(EFM32_IRQ_PENDSV, efm32_pendsv);
|
||||
irq_attach(EFM32_IRQ_DBGMONITOR, efm32_dbgmonitor);
|
||||
irq_attach(EFM32_IRQ_RESERVED, efm32_reserved);
|
||||
irq_attach(EFM32_IRQ_BUSFAULT, efm32_busfault, NULL);
|
||||
irq_attach(EFM32_IRQ_USAGEFAULT, efm32_usagefault, NULL);
|
||||
irq_attach(EFM32_IRQ_PENDSV, efm32_pendsv, NULL);
|
||||
irq_attach(EFM32_IRQ_DBGMONITOR, efm32_dbgmonitor, NULL);
|
||||
irq_attach(EFM32_IRQ_RESERVED, efm32_reserved, NULL);
|
||||
#endif
|
||||
|
||||
efm32_dumpnvic("initial", NR_VECTORS);
|
||||
|
||||
@@ -165,10 +165,10 @@ static int efm32_attach(struct uart_dev_s *dev);
|
||||
static void efm32_detach(struct uart_dev_s *dev);
|
||||
static int efm32_interrupt(struct uart_dev_s *dev);
|
||||
#if defined(CONFIG_EFM32_LEUART0)
|
||||
static int efm32_leuart0_interrupt(int irq, void *context);
|
||||
static int efm32_leuart0_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#if defined(CONFIG_EFM32_LEUART1)
|
||||
static int efm32_leuart1_interrupt(int irq, void *context);
|
||||
static int efm32_leuart1_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
static int efm32_ioctl(struct file *filep, int cmd, unsigned long arg);
|
||||
static int efm32_receive(struct uart_dev_s *dev, uint32_t *status);
|
||||
@@ -429,7 +429,7 @@ static int efm32_attach(struct uart_dev_s *dev)
|
||||
* disabled in the C2 register.
|
||||
*/
|
||||
|
||||
ret = irq_attach(config->irq, config->handler);
|
||||
ret = irq_attach(config->irq, config->handler, NULL);
|
||||
if (ret >= 0)
|
||||
{
|
||||
up_enable_irq(config->irq);
|
||||
@@ -535,14 +535,14 @@ static int efm32_interrupt(struct uart_dev_s *dev)
|
||||
}
|
||||
|
||||
#if defined(CONFIG_EFM32_LEUART0)
|
||||
static int efm32_leuart0_interrupt(int irq, void *context)
|
||||
static int efm32_leuart0_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_interrupt(&g_leuart0port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_EFM32_LEUART1)
|
||||
static int efm32_leuart1_interrupt(int irq, void *context)
|
||||
static int efm32_leuart1_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_interrupt(&g_leuart1port);
|
||||
}
|
||||
|
||||
@@ -135,16 +135,16 @@ static int pwm_timer(FAR struct efm32_pwmtimer_s *priv,
|
||||
)
|
||||
static int pwm_interrupt(struct efm32_pwmtimer_s *priv);
|
||||
#if defined(CONFIG_EFM32_TIMER0_PWM)
|
||||
static int pwm_timer0_interrupt(int irq, void *context);
|
||||
static int pwm_timer0_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#if defined(CONFIG_EFM32_TIMER1_PWM)
|
||||
static int pwm_timer1_interrupt(int irq, void *context);
|
||||
#endif
|
||||
#if defined(CONFIG_EFM32_TIMER2_PWM)
|
||||
static int pwm_timer2_interrupt(int irq, void *context);
|
||||
static int pwm_timer2_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#if defined(CONFIG_EFM32_TIMER3_PWM)
|
||||
static int pwm_timer3_interrupt(int irq, void *context);
|
||||
static int pwm_timer3_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
static uint8_t pwm_pulsecount(uint32_t count);
|
||||
|
||||
@@ -547,7 +547,7 @@ static int pwm_interrupt(struct efm32_pwmtimer_s *priv)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_PWM_PULSECOUNT) && defined(CONFIG_EFM32_TIMER0_PWM)
|
||||
static int pwm_timer0_interrupt(int irq, void *context)
|
||||
static int pwm_timer0_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return pwm_interrupt(&g_pwm0dev);
|
||||
}
|
||||
@@ -561,14 +561,14 @@ static int pwm_timer1_interrupt(int irq, void *context)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PWM_PULSECOUNT) && defined(CONFIG_EFM32_TIMER2_PWM)
|
||||
static int pwm_timer2_interrupt(int irq, void *context)
|
||||
static int pwm_timer2_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return pwm_interrupt(&g_pwm2dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PWM_PULSECOUNT) && defined(CONFIG_EFM32_TIMER3_PWM)
|
||||
static int pwm_timer3_interrupt(int irq, void *context)
|
||||
static int pwm_timer3_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return pwm_interrupt(&g_pwm3dev);
|
||||
}
|
||||
@@ -870,7 +870,7 @@ FAR struct pwm_lowerhalf_s *efm32_pwminitialize(int timer)
|
||||
/* Attach but disable the TIM1 update interrupt */
|
||||
|
||||
#ifdef CONFIG_PWM_PULSECOUNT
|
||||
irq_attach(lower->irq, pwm_timer0_interrupt);
|
||||
irq_attach(lower->irq, pwm_timer0_interrupt, NULL);
|
||||
up_disable_irq(lower->irq);
|
||||
#endif
|
||||
break;
|
||||
@@ -883,7 +883,7 @@ FAR struct pwm_lowerhalf_s *efm32_pwminitialize(int timer)
|
||||
/* Attach but disable the TIM1 update interrupt */
|
||||
|
||||
#ifdef CONFIG_PWM_PULSECOUNT
|
||||
irq_attach(lower->irq, pwm_timer0_interrupt);
|
||||
irq_attach(lower->irq, pwm_timer0_interrupt, NULL);
|
||||
up_disable_irq(lower->irq);
|
||||
#endif
|
||||
break;
|
||||
@@ -895,7 +895,7 @@ FAR struct pwm_lowerhalf_s *efm32_pwminitialize(int timer)
|
||||
/* Attach but disable the TIM1 update interrupt */
|
||||
|
||||
#ifdef CONFIG_PWM_PULSECOUNT
|
||||
irq_attach(lower->irq, pwm_timer2_interrupt);
|
||||
irq_attach(lower->irq, pwm_timer2_interrupt, NULL);
|
||||
up_disable_irq(lower->irq);
|
||||
#endif
|
||||
break;
|
||||
@@ -907,7 +907,7 @@ FAR struct pwm_lowerhalf_s *efm32_pwminitialize(int timer)
|
||||
/* Attach but disable the TIM1 update interrupt */
|
||||
|
||||
#ifdef CONFIG_PWM_PULSECOUNT
|
||||
irq_attach(lower->irq, pwm_timer3_interrupt);
|
||||
irq_attach(lower->irq, pwm_timer3_interrupt, NULL);
|
||||
up_disable_irq(lower->irq);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@@ -175,7 +175,7 @@ volatile bool g_rtc_enabled = false;
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
static int efm32_rtc_burtc_interrupt(int irq, void *context)
|
||||
static int efm32_rtc_burtc_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
uint32_t source = getreg32(EFM32_BURTC_IF);
|
||||
|
||||
@@ -378,7 +378,7 @@ int up_rtc_initialize(void)
|
||||
|
||||
/* Configure RTC interrupt to catch overflow and alarm interrupts. */
|
||||
|
||||
irq_attach(EFM32_IRQ_BURTC, efm32_rtc_burtc_interrupt);
|
||||
irq_attach(EFM32_IRQ_BURTC, efm32_rtc_burtc_interrupt, NULL);
|
||||
up_enable_irq(EFM32_IRQ_BURTC);
|
||||
|
||||
g_rtc_enabled = true;
|
||||
|
||||
@@ -259,35 +259,35 @@ static int efm32_attach(struct uart_dev_s *dev);
|
||||
static void efm32_detach(struct uart_dev_s *dev);
|
||||
static int efm32_rxinterrupt(struct uart_dev_s *dev);
|
||||
#if defined(CONFIG_EFM32_USART0_ISUART)
|
||||
static int efm32_usart0_rxinterrupt(int irq, void *context);
|
||||
static int efm32_usart0_rxinterrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#if defined(CONFIG_EFM32_USART1_ISUART)
|
||||
static int efm32_usart1_rxinterrupt(int irq, void *context);
|
||||
static int efm32_usart1_rxinterrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#if defined(CONFIG_EFM32_USART2_ISUART)
|
||||
static int efm32_usart2_rxinterrupt(int irq, void *context);
|
||||
static int efm32_usart2_rxinterrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#if defined(CONFIG_EFM32_UART0)
|
||||
static int efm32_uart0_rxinterrupt(int irq, void *context);
|
||||
static int efm32_uart0_rxinterrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#if defined(CONFIG_EFM32_UART1)
|
||||
static int efm32_uart1_rxinterrupt(int irq, void *context);
|
||||
static int efm32_uart1_rxinterrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
static int efm32_txinterrupt(struct uart_dev_s *dev);
|
||||
#if defined(CONFIG_EFM32_USART0_ISUART)
|
||||
static int efm32_usart0_txinterrupt(int irq, void *context);
|
||||
static int efm32_usart0_txinterrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#if defined(CONFIG_EFM32_USART1_ISUART)
|
||||
static int efm32_usart1_txinterrupt(int irq, void *context);
|
||||
static int efm32_usart1_txinterrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#if defined(CONFIG_EFM32_USART2_ISUART)
|
||||
static int efm32_usart2_txinterrupt(int irq, void *context);
|
||||
static int efm32_usart2_txinterrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#if defined(CONFIG_EFM32_UART0)
|
||||
static int efm32_uart0_txinterrupt(int irq, void *context);
|
||||
static int efm32_uart0_txinterrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#if defined(CONFIG_EFM32_UART1)
|
||||
static int efm32_uart1_txinterrupt(int irq, void *context);
|
||||
static int efm32_uart1_txinterrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
static int efm32_ioctl(struct file *filep, int cmd, unsigned long arg);
|
||||
static int efm32_receive(struct uart_dev_s *dev, uint32_t *status);
|
||||
@@ -689,13 +689,13 @@ static int efm32_attach(struct uart_dev_s *dev)
|
||||
* disabled in the C2 register.
|
||||
*/
|
||||
|
||||
ret = irq_attach(config->rxirq, config->rxhandler);
|
||||
ret = irq_attach(config->rxirq, config->rxhandler, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = irq_attach(config->txirq, config->txhandler);
|
||||
ret = irq_attach(config->txirq, config->txhandler, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
irq_detach(config->rxirq);
|
||||
@@ -788,35 +788,35 @@ static int efm32_rxinterrupt(struct uart_dev_s *dev)
|
||||
}
|
||||
|
||||
#if defined(CONFIG_EFM32_USART0_ISUART)
|
||||
static int efm32_usart0_rxinterrupt(int irq, void *context)
|
||||
static int efm32_usart0_rxinterrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_rxinterrupt(&g_usart0port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_EFM32_USART1_ISUART)
|
||||
static int efm32_usart1_rxinterrupt(int irq, void *context)
|
||||
static int efm32_usart1_rxinterrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_rxinterrupt(&g_usart1port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_EFM32_USART2_ISUART)
|
||||
static int efm32_usart2_rxinterrupt(int irq, void *context)
|
||||
static int efm32_usart2_rxinterrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_rxinterrupt(&g_usart2port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_EFM32_UART0)
|
||||
static int efm32_uart0_rxinterrupt(int irq, void *context)
|
||||
static int efm32_uart0_rxinterrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_rxinterrupt(&g_uart0port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_EFM32_UART1)
|
||||
static int efm32_uart1_rxinterrupt(int irq, void *context)
|
||||
static int efm32_uart1_rxinterrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_rxinterrupt(&g_uart1port);
|
||||
}
|
||||
@@ -871,35 +871,35 @@ static int efm32_txinterrupt(struct uart_dev_s *dev)
|
||||
}
|
||||
|
||||
#if defined(CONFIG_EFM32_USART0_ISUART)
|
||||
static int efm32_usart0_txinterrupt(int irq, void *context)
|
||||
static int efm32_usart0_txinterrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_txinterrupt(&g_usart0port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_EFM32_USART1_ISUART)
|
||||
static int efm32_usart1_txinterrupt(int irq, void *context)
|
||||
static int efm32_usart1_txinterrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_txinterrupt(&g_usart1port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_EFM32_USART2_ISUART)
|
||||
static int efm32_usart2_txinterrupt(int irq, void *context)
|
||||
static int efm32_usart2_txinterrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_txinterrupt(&g_usart2port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_EFM32_UART0)
|
||||
static int efm32_uart0_txinterrupt(int irq, void *context)
|
||||
static int efm32_uart0_txinterrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_txinterrupt(&g_uart0port);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_EFM32_UART1)
|
||||
static int efm32_uart1_txinterrupt(int irq, void *context)
|
||||
static int efm32_uart1_txinterrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return efm32_txinterrupt(&g_uart1port);
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int efm32_timerisr(int irq, uint32_t *regs)
|
||||
static int efm32_timerisr(int irq, uint32_t *regs, FAR void *arg)
|
||||
{
|
||||
/* Process timer interrupt */
|
||||
|
||||
@@ -125,7 +125,7 @@ void arm_timer_initialize(void)
|
||||
|
||||
/* Attach the timer interrupt vector */
|
||||
|
||||
(void)irq_attach(EFM32_IRQ_SYSTICK, (xcpt_t)efm32_timerisr);
|
||||
(void)irq_attach(EFM32_IRQ_SYSTICK, (xcpt_t)efm32_timerisr, NULL);
|
||||
|
||||
/* Enable SysTick interrupts */
|
||||
|
||||
|
||||
@@ -574,7 +574,7 @@ static inline void efm32_otginterrupt(FAR struct efm32_usbdev_s *priv);
|
||||
|
||||
/* First level interrupt processing */
|
||||
|
||||
static int efm32_usbinterrupt(int irq, FAR void *context);
|
||||
static int efm32_usbinterrupt(int irq, FAR void *context, FAR void *arg);
|
||||
|
||||
/* Endpoint operations *********************************************************/
|
||||
/* Global OUT NAK controls */
|
||||
@@ -3498,7 +3498,7 @@ static inline void efm32_otginterrupt(FAR struct efm32_usbdev_s *priv)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int efm32_usbinterrupt(int irq, FAR void *context)
|
||||
static int efm32_usbinterrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
/* At present, there is only a single OTG FS device support. Hence it is
|
||||
* pre-allocated as g_otgfsdev. However, in most code, the private data
|
||||
@@ -5485,7 +5485,7 @@ void up_usbinitialize(void)
|
||||
|
||||
/* Attach the OTG FS interrupt handler */
|
||||
|
||||
ret = irq_attach(EFM32_IRQ_USB, efm32_usbinterrupt);
|
||||
ret = irq_attach(EFM32_IRQ_USB, efm32_usbinterrupt, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
uerr("ERROR: irq_attach failed\n", ret);
|
||||
|
||||
@@ -417,7 +417,7 @@ static inline void efm32_gint_ipxfrisr(FAR struct efm32_usbhost_s *priv);
|
||||
|
||||
/* First level, global interrupt handler */
|
||||
|
||||
static int efm32_gint_isr(int irq, FAR void *context);
|
||||
static int efm32_gint_isr(int irq, FAR void *context, FAR void *arg);
|
||||
|
||||
/* Interrupt controls */
|
||||
|
||||
@@ -3495,7 +3495,7 @@ static inline void efm32_gint_ipxfrisr(FAR struct efm32_usbhost_s *priv)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int efm32_gint_isr(int irq, FAR void *context)
|
||||
static int efm32_gint_isr(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
/* At present, there is only support for a single OTG FS host. Hence it is
|
||||
* pre-allocated as g_usbhost. However, in most code, the private data
|
||||
@@ -5374,7 +5374,7 @@ FAR struct usbhost_connection_s *efm32_usbhost_initialize(int controller)
|
||||
|
||||
/* Attach USB host controller interrupt handler */
|
||||
|
||||
if (irq_attach(EFM32_IRQ_USB, efm32_gint_isr) != 0)
|
||||
if (irq_attach(EFM32_IRQ_USB, efm32_gint_isr, NULL) != 0)
|
||||
{
|
||||
usbhost_trace1(USBHOST_TRACE1_IRQATTACH, 0);
|
||||
return NULL;
|
||||
|
||||
@@ -112,7 +112,7 @@ static void up_shutdown(struct uart_dev_s *dev);
|
||||
static int up_attach(struct uart_dev_s *dev);
|
||||
static void up_detach(struct uart_dev_s *dev);
|
||||
static inline struct uart_dev_s *up_mapirq(int irq);
|
||||
static int up_interrupt(int irq, void *context);
|
||||
static int up_interrupt(int irq, void *context, FAR void *arg);
|
||||
static int up_ioctl(struct file *filep, int cmd, unsigned long arg);
|
||||
static int up_receive(struct uart_dev_s *dev, uint32_t *status);
|
||||
static void up_rxint(struct uart_dev_s *dev, bool enable);
|
||||
@@ -753,13 +753,13 @@ static int up_attach(struct uart_dev_s *dev)
|
||||
/* Attach and enable the IRQ */
|
||||
|
||||
#if defined(CONFIG_ARCH_CHIP_IMX1) || defined(CONFIG_ARCH_CHIP_IMXL)
|
||||
ret = irq_attach(priv->rxirq, up_interrupt);
|
||||
ret = irq_attach(priv->rxirq, up_interrupt, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = irq_attach(priv->txirq, up_interrupt);
|
||||
ret = irq_attach(priv->txirq, up_interrupt, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
irq_detach(priv->rxirq);
|
||||
@@ -772,7 +772,7 @@ static int up_attach(struct uart_dev_s *dev)
|
||||
up_enable_irq(priv->txirq);
|
||||
|
||||
#else
|
||||
ret = irq_attach(priv->irq, up_interrupt);
|
||||
ret = irq_attach(priv->irq, up_interrupt, NULL);
|
||||
if (ret == OK)
|
||||
{
|
||||
/* Enable the interrupt (RX and TX interrupts are still disabled
|
||||
@@ -877,7 +877,7 @@ static inline struct uart_dev_s *up_mapirq(int irq)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int up_interrupt(int irq, void *context)
|
||||
static int up_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
struct uart_dev_s *dev;
|
||||
struct up_dev_s *priv;
|
||||
|
||||
@@ -165,7 +165,7 @@ static int spi_transfer(struct imx_spidev_s *priv, const void *txbuffer,
|
||||
|
||||
#ifndef CONFIG_SPI_POLLWAIT
|
||||
static inline struct imx_spidev_s *spi_mapirq(int irq);
|
||||
static int spi_interrupt(int irq, void *context);
|
||||
static int spi_interrupt(int irq, void *context, FAR void *arg, FAR void *arg);
|
||||
#endif
|
||||
|
||||
/* SPI methods */
|
||||
@@ -653,7 +653,7 @@ static inline struct imx_spidev_s *spi_mapirq(int irq)
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_SPI_POLLWAIT
|
||||
static int spi_interrupt(int irq, void *context)
|
||||
static int spi_interrupt(int irq, void *context, FAR void *arg, FAR void *arg)
|
||||
{
|
||||
struct imx_spidev_s *priv = spi_mapirq(irq);
|
||||
int ntxd;
|
||||
@@ -1168,7 +1168,7 @@ FAR struct spi_dev_s *imx_spibus_initialize(int port)
|
||||
/* Attach the interrupt */
|
||||
|
||||
#ifndef CONFIG_SPI_POLLWAIT
|
||||
irq_attach(priv->irq, (xcpt_t)spi_interrupt);
|
||||
irq_attach(priv->irq, (xcpt_t)spi_interrupt, NULL);
|
||||
#endif
|
||||
|
||||
/* Enable SPI */
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int imx_timerisr(int irq, uint32_t *regs)
|
||||
static int imx_timerisr(int irq, uint32_t *regs, FAR void *arg)
|
||||
{
|
||||
uint32_t tstat;
|
||||
int ret = -EIO;
|
||||
@@ -150,7 +150,7 @@ void arm_timer_initialize(void)
|
||||
|
||||
/* Attach and enable the timer interrupt */
|
||||
|
||||
irq_attach(IMX_IRQ_SYSTIMER, (xcpt_t)imx_timerisr);
|
||||
irq_attach(IMX_IRQ_SYSTIMER, (xcpt_t)imx_timerisr, NULL);
|
||||
up_enable_irq(IMX_IRQ_SYSTIMER);
|
||||
}
|
||||
|
||||
|
||||
@@ -225,19 +225,19 @@ static int spi_transfer(struct imx_spidev_s *priv, const void *txbuffer,
|
||||
#ifndef CONFIG_SPI_POLLWAIT
|
||||
static int spi_interrupt(struct imx_spidev_s *priv);
|
||||
#ifdef CONFIG_IMX6_ECSPI1
|
||||
static int ecspi1_interrupt(int irq, void *context);
|
||||
static int ecspi1_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_IMX6_ECSPI2
|
||||
static int ecspi2_interrupt(int irq, void *context);
|
||||
static int ecspi2_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_IMX6_ECSPI3
|
||||
static int ecspi3_interrupt(int irq, void *context);
|
||||
static int ecspi3_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_IMX6_ECSPI4
|
||||
static int ecspi4_interrupt(int irq, void *context);
|
||||
static int ecspi4_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_IMX6_ECSPI5
|
||||
static int ecspi5_interrupt(int irq, void *context);
|
||||
static int ecspi5_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -806,35 +806,35 @@ static int spi_interrupt(struct imx_spidev_s *priv)
|
||||
|
||||
#ifndef CONFIG_SPI_POLLWAIT
|
||||
#ifdef CONFIG_IMX6_ECSPI1
|
||||
static int ecspi1_interrupt(int irq, void *context)
|
||||
static int ecspi1_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return spi_interrupt(&g_spidev[SPI1_NDX]);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IMX6_ECSPI2
|
||||
static int ecspi2_interrupt(int irq, void *context)
|
||||
static int ecspi2_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return spi_interrupt(&g_spidev[SPI2_NDX]);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IMX6_ECSPI3
|
||||
static int ecspi3_interrupt(int irq, void *context)
|
||||
static int ecspi3_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return spi_interrupt(&g_spidev[SPI3_NDX]);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IMX6_ECSPI4
|
||||
static int ecspi4_interrupt(int irq, void *context)
|
||||
static int ecspi4_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return spi_interrupt(&g_spidev[SPI4_NDX]);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IMX6_ECSPI5
|
||||
static int ecspi5_interrupt(int irq, void *context)
|
||||
static int ecspi5_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return spi_interrupt(&g_spidev[SPI5_NDX]);
|
||||
}
|
||||
@@ -1425,7 +1425,7 @@ FAR struct spi_dev_s *imx_spibus_initialize(int port)
|
||||
/* Attach the interrupt */
|
||||
|
||||
#ifndef CONFIG_SPI_POLLWAIT
|
||||
DEBUGVERIFY(irq_attach(priv->irq, priv->handler));
|
||||
DEBUGVERIFY(irq_attach(priv->irq, priv->handler, NULL));
|
||||
#endif
|
||||
|
||||
/* Enable SPI */
|
||||
|
||||
@@ -232,19 +232,19 @@ static void imx_detach(struct uart_dev_s *dev);
|
||||
|
||||
static int imx_interrupt(struct uart_dev_s *dev);
|
||||
#ifdef CONFIG_IMX6_UART1
|
||||
static int imx_uart1_interrupt(int irq, void *context);
|
||||
static int imx_uart1_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_IMX6_UART2
|
||||
static int imx_uart2_interrupt(int irq, void *context);
|
||||
static int imx_uart2_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_IMX6_UART3
|
||||
static int imx_uart3_interrupt(int irq, void *context);
|
||||
static int imx_uart3_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_IMX6_UART4
|
||||
static int imx_uart4_interrupt(int irq, void *context);
|
||||
static int imx_uart4_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_IMX6_UART5
|
||||
static int imx_uart5_interrupt(int irq, void *context);
|
||||
static int imx_uart5_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
|
||||
static int imx_ioctl(struct file *filep, int cmd, unsigned long arg);
|
||||
@@ -618,7 +618,7 @@ static int imx_attach(struct uart_dev_s *dev)
|
||||
|
||||
/* Attach and enable the IRQ */
|
||||
|
||||
ret = irq_attach(priv->irq, priv->handler);
|
||||
ret = irq_attach(priv->irq, priv->handler, NULL);
|
||||
if (ret == OK)
|
||||
{
|
||||
/* Configure as a (high) level interrupt */
|
||||
@@ -720,31 +720,31 @@ static int imx_interrupt(struct uart_dev_s *dev)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_IMX6_UART1
|
||||
static int imx_uart1_interrupt(int irq, void *context)
|
||||
static int imx_uart1_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return imx_interrupt(&g_uart1port);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_IMX6_UART2
|
||||
static int imx_uart2_interrupt(int irq, void *context)
|
||||
static int imx_uart2_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return imx_interrupt(&g_uart2port);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_IMX6_UART3
|
||||
static int imx_uart3_interrupt(int irq, void *context)
|
||||
static int imx_uart3_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return imx_interrupt(&g_uart3port);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_IMX6_UART4
|
||||
static int imx_uart4_interrupt(int irq, void *context)
|
||||
static int imx_uart4_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return imx_interrupt(&g_uart4port);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_IMX6_UART5
|
||||
static int imx_uart5_interrupt(int irq, void *context)
|
||||
static int imx_uart5_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
return imx_interrupt(&g_uart5port);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ static void imx_output_compare(uint32_t sr, uint32_t of)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int imx_timerisr(int irq, uint32_t *regs)
|
||||
static int imx_timerisr(int irq, uint32_t *regs, FAR void *arg)
|
||||
{
|
||||
/* Sample the SR (once) */
|
||||
|
||||
@@ -260,7 +260,7 @@ void arm_timer_initialize(void)
|
||||
|
||||
/* Attach the timer interrupt vector */
|
||||
|
||||
(void)irq_attach(IMX_IRQ_GPT, (xcpt_t)imx_timerisr);
|
||||
(void)irq_attach(IMX_IRQ_GPT, (xcpt_t)imx_timerisr, NULL);
|
||||
|
||||
/* Enable all three GPT output compare interrupts */
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ static void kinetis_receive(FAR struct kinetis_driver_s *priv);
|
||||
static void kinetis_txdone(FAR struct kinetis_driver_s *priv);
|
||||
|
||||
static void kinetis_interrupt_work(FAR void *arg);
|
||||
static int kinetis_interrupt(int irq, FAR void *context);
|
||||
static int kinetis_interrupt(int irq, FAR void *context, FAR void *arg);
|
||||
|
||||
/* Watchdog timer expirations */
|
||||
|
||||
@@ -921,7 +921,7 @@ static void kinetis_interrupt_work(FAR void *arg)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int kinetis_interrupt(int irq, FAR void *context)
|
||||
static int kinetis_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
register FAR struct kinetis_driver_s *priv = &g_enet[0];
|
||||
|
||||
@@ -2097,7 +2097,7 @@ int kinetis_netinitialize(int intf)
|
||||
/* Attach the Ethernet MAC IEEE 1588 timer interrupt handler */
|
||||
|
||||
#if 0
|
||||
if (irq_attach(KINETIS_IRQ_EMACTMR, kinetis_tmrinterrupt))
|
||||
if (irq_attach(KINETIS_IRQ_EMACTMR, kinetis_tmrinterrupt, NULL))
|
||||
{
|
||||
/* We could not attach the ISR to the interrupt */
|
||||
|
||||
@@ -2108,7 +2108,7 @@ int kinetis_netinitialize(int intf)
|
||||
|
||||
/* Attach the Ethernet MAC transmit interrupt handler */
|
||||
|
||||
if (irq_attach(KINETIS_IRQ_EMACTX, kinetis_interrupt))
|
||||
if (irq_attach(KINETIS_IRQ_EMACTX, kinetis_interrupt, NULL))
|
||||
{
|
||||
/* We could not attach the ISR to the interrupt */
|
||||
|
||||
@@ -2118,7 +2118,7 @@ int kinetis_netinitialize(int intf)
|
||||
|
||||
/* Attach the Ethernet MAC receive interrupt handler */
|
||||
|
||||
if (irq_attach(KINETIS_IRQ_EMACRX, kinetis_interrupt))
|
||||
if (irq_attach(KINETIS_IRQ_EMACRX, kinetis_interrupt, NULL))
|
||||
{
|
||||
/* We could not attach the ISR to the interrupt */
|
||||
|
||||
@@ -2128,7 +2128,7 @@ int kinetis_netinitialize(int intf)
|
||||
|
||||
/* Attach the Ethernet MAC error and misc interrupt handler */
|
||||
|
||||
if (irq_attach(KINETIS_IRQ_EMACMISC, kinetis_interrupt))
|
||||
if (irq_attach(KINETIS_IRQ_EMACMISC, kinetis_interrupt, NULL))
|
||||
{
|
||||
/* We could not attach the ISR to the interrupt */
|
||||
|
||||
|
||||
@@ -1124,7 +1124,7 @@ struct i2c_master_s *kinetis_i2cbus_initialize(int port)
|
||||
|
||||
/* Attach Interrupt Handler */
|
||||
|
||||
irq_attach(priv->irqid, handler);
|
||||
irq_attach(priv->irqid, handler, NULL);
|
||||
|
||||
/* Enable Interrupt Handler */
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ static void kinetis_dumpnvic(const char *msg, int irq)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
static int kinetis_nmi(int irq, FAR void *context)
|
||||
static int kinetis_nmi(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! NMI received\n");
|
||||
@@ -178,7 +178,7 @@ static int kinetis_nmi(int irq, FAR void *context)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int kinetis_busfault(int irq, FAR void *context)
|
||||
static int kinetis_busfault(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! Bus fault recived\n");
|
||||
@@ -186,7 +186,7 @@ static int kinetis_busfault(int irq, FAR void *context)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int kinetis_usagefault(int irq, FAR void *context)
|
||||
static int kinetis_usagefault(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! Usage fault received\n");
|
||||
@@ -194,7 +194,7 @@ static int kinetis_usagefault(int irq, FAR void *context)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int kinetis_pendsv(int irq, FAR void *context)
|
||||
static int kinetis_pendsv(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! PendSV received\n");
|
||||
@@ -202,7 +202,7 @@ static int kinetis_pendsv(int irq, FAR void *context)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int kinetis_dbgmonitor(int irq, FAR void *context)
|
||||
static int kinetis_dbgmonitor(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! Debug Monitor received\n");
|
||||
@@ -210,7 +210,7 @@ static int kinetis_dbgmonitor(int irq, FAR void *context)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int kinetis_reserved(int irq, FAR void *context)
|
||||
static int kinetis_reserved(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! Reserved interrupt\n");
|
||||
@@ -398,8 +398,8 @@ void up_irqinitialize(void)
|
||||
* under certain conditions.
|
||||
*/
|
||||
|
||||
irq_attach(KINETIS_IRQ_SVCALL, up_svcall);
|
||||
irq_attach(KINETIS_IRQ_HARDFAULT, up_hardfault);
|
||||
irq_attach(KINETIS_IRQ_SVCALL, up_svcall, NULL);
|
||||
irq_attach(KINETIS_IRQ_HARDFAULT, up_hardfault, NULL);
|
||||
|
||||
/* Set the priority of the SVCall interrupt */
|
||||
|
||||
@@ -415,22 +415,22 @@ void up_irqinitialize(void)
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARM_MPU
|
||||
irq_attach(KINETIS_IRQ_MEMFAULT, up_memfault);
|
||||
irq_attach(KINETIS_IRQ_MEMFAULT, up_memfault, NULL);
|
||||
up_enable_irq(KINETIS_IRQ_MEMFAULT);
|
||||
#endif
|
||||
|
||||
/* Attach all other processor exceptions (except reset and sys tick) */
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
irq_attach(KINETIS_IRQ_NMI, kinetis_nmi);
|
||||
irq_attach(KINETIS_IRQ_NMI, kinetis_nmi, NULL);
|
||||
#ifndef CONFIG_ARM_MPU
|
||||
irq_attach(KINETIS_IRQ_MEMFAULT, up_memfault);
|
||||
irq_attach(KINETIS_IRQ_MEMFAULT, up_memfault, NULL);
|
||||
#endif
|
||||
irq_attach(KINETIS_IRQ_BUSFAULT, kinetis_busfault);
|
||||
irq_attach(KINETIS_IRQ_USAGEFAULT, kinetis_usagefault);
|
||||
irq_attach(KINETIS_IRQ_PENDSV, kinetis_pendsv);
|
||||
irq_attach(KINETIS_IRQ_DBGMONITOR, kinetis_dbgmonitor);
|
||||
irq_attach(KINETIS_IRQ_RESERVED, kinetis_reserved);
|
||||
irq_attach(KINETIS_IRQ_BUSFAULT, kinetis_busfault, NULL);
|
||||
irq_attach(KINETIS_IRQ_USAGEFAULT, kinetis_usagefault, NULL);
|
||||
irq_attach(KINETIS_IRQ_PENDSV, kinetis_pendsv, NULL);
|
||||
irq_attach(KINETIS_IRQ_DBGMONITOR, kinetis_dbgmonitor, NULL);
|
||||
irq_attach(KINETIS_IRQ_RESERVED, kinetis_reserved, NULL);
|
||||
#endif
|
||||
|
||||
kinetis_dumpnvic("initial", NR_IRQS);
|
||||
|
||||
@@ -169,31 +169,31 @@ static int kinetis_portinterrupt(int irq, FAR void *context,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_KINETIS_PORTAINTS
|
||||
static int kinetis_portainterrupt(int irq, FAR void *context)
|
||||
static int kinetis_portainterrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
return kinetis_portinterrupt(irq, context, KINETIS_PORTA_ISFR, g_portaisrs);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_KINETIS_PORTBINTS
|
||||
static int kinetis_portbinterrupt(int irq, FAR void *context)
|
||||
static int kinetis_portbinterrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
return kinetis_portinterrupt(irq, context, KINETIS_PORTB_ISFR, g_portbisrs);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_KINETIS_PORTCINTS
|
||||
static int kinetis_portcinterrupt(int irq, FAR void *context)
|
||||
static int kinetis_portcinterrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
return kinetis_portinterrupt(irq, context, KINETIS_PORTC_ISFR, g_portcisrs);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_KINETIS_PORTDINTS
|
||||
static int kinetis_portdinterrupt(int irq, FAR void *context)
|
||||
static int kinetis_portdinterrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
return kinetis_portinterrupt(irq, context, KINETIS_PORTD_ISFR, g_portdisrs);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_KINETIS_PORTEINTS
|
||||
static int kinetis_porteinterrupt(int irq, FAR void *context)
|
||||
static int kinetis_porteinterrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
return kinetis_portinterrupt(irq, context, KINETIS_PORTE_ISFR, g_porteisrs);
|
||||
}
|
||||
@@ -215,27 +215,27 @@ static int kinetis_porteinterrupt(int irq, FAR void *context)
|
||||
void kinetis_pinirqinitialize(void)
|
||||
{
|
||||
#ifdef CONFIG_KINETIS_PORTAINTS
|
||||
(void)irq_attach(KINETIS_IRQ_PORTA, kinetis_portainterrupt);
|
||||
(void)irq_attach(KINETIS_IRQ_PORTA, kinetis_portainterrupt, NULL);
|
||||
putreg32(0xffffffff, KINETIS_PORTA_ISFR);
|
||||
up_enable_irq(KINETIS_IRQ_PORTA);
|
||||
#endif
|
||||
#ifdef CONFIG_KINETIS_PORTBINTS
|
||||
(void)irq_attach(KINETIS_IRQ_PORTB, kinetis_portbinterrupt);
|
||||
(void)irq_attach(KINETIS_IRQ_PORTB, kinetis_portbinterrupt, NULL);
|
||||
putreg32(0xffffffff, KINETIS_PORTB_ISFR);
|
||||
up_enable_irq(KINETIS_IRQ_PORTB);
|
||||
#endif
|
||||
#ifdef CONFIG_KINETIS_PORTCINTS
|
||||
(void)irq_attach(KINETIS_IRQ_PORTC, kinetis_portcinterrupt);
|
||||
(void)irq_attach(KINETIS_IRQ_PORTC, kinetis_portcinterrupt, NULL);
|
||||
putreg32(0xffffffff, KINETIS_PORTC_ISFR);
|
||||
up_enable_irq(KINETIS_IRQ_PORTC);
|
||||
#endif
|
||||
#ifdef CONFIG_KINETIS_PORTDINTS
|
||||
(void)irq_attach(KINETIS_IRQ_PORTD, kinetis_portdinterrupt);
|
||||
(void)irq_attach(KINETIS_IRQ_PORTD, kinetis_portdinterrupt, NULL);
|
||||
putreg32(0xffffffff, KINETIS_PORTD_ISFR);
|
||||
up_enable_irq(KINETIS_IRQ_PORTD);
|
||||
#endif
|
||||
#ifdef CONFIG_KINETIS_PORTEINTS
|
||||
(void)irq_attach(KINETIS_IRQ_PORTE, kinetis_porteinterrupt);
|
||||
(void)irq_attach(KINETIS_IRQ_PORTE, kinetis_porteinterrupt, NULL);
|
||||
putreg32(0xffffffff, KINETIS_PORTE_ISFR);
|
||||
up_enable_irq(KINETIS_IRQ_PORTE);
|
||||
#endif
|
||||
|
||||
@@ -172,7 +172,7 @@ static void rtc_dumptime(FAR struct tm *tp, FAR const char *msg)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_RTC_ALARM)
|
||||
static int kinetis_rtc_interrupt(int irq, void *context)
|
||||
static int kinetis_rtc_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
uint16_t rtc_sr;
|
||||
|
||||
@@ -279,7 +279,7 @@ int up_rtc_irq_attach(void)
|
||||
* KINETIS_IRQ_RTCS is a separate interrupt for seconds if needed
|
||||
*/
|
||||
|
||||
irq_attach(KINETIS_IRQ_RTC, kinetis_rtc_interrupt);
|
||||
irq_attach(KINETIS_IRQ_RTC, kinetis_rtc_interrupt, NULL);
|
||||
up_enable_irq(KINETIS_IRQ_RTC);
|
||||
}
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ static void kinetis_endtransfer(struct kinetis_dev_s *priv, sdio_eventset_t wkup
|
||||
|
||||
/* Interrupt Handling *******************************************************/
|
||||
|
||||
static int kinetis_interrupt(int irq, void *context);
|
||||
static int kinetis_interrupt(int irq, void *context, FAR void *arg);
|
||||
|
||||
/* SDIO interface methods ***************************************************/
|
||||
|
||||
@@ -1065,7 +1065,7 @@ static void kinetis_endtransfer(struct kinetis_dev_s *priv, sdio_eventset_t wkup
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int kinetis_interrupt(int irq, void *context)
|
||||
static int kinetis_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
struct kinetis_dev_s *priv = &g_sdhcdev;
|
||||
uint32_t enabled;
|
||||
@@ -1681,7 +1681,7 @@ static int kinetis_attach(FAR struct sdio_dev_s *dev)
|
||||
|
||||
/* Attach the SDIO interrupt handler */
|
||||
|
||||
ret = irq_attach(KINETIS_IRQ_SDHC, kinetis_interrupt);
|
||||
ret = irq_attach(KINETIS_IRQ_SDHC, kinetis_interrupt, NULL);
|
||||
if (ret == OK)
|
||||
{
|
||||
|
||||
|
||||
@@ -253,9 +253,9 @@ static void up_shutdown(struct uart_dev_s *dev);
|
||||
static int up_attach(struct uart_dev_s *dev);
|
||||
static void up_detach(struct uart_dev_s *dev);
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
static int up_interrupt(int irq, void *context);
|
||||
static int up_interrupt(int irq, void *context, FAR void *arg);
|
||||
#endif
|
||||
static int up_interrupts(int irq, void *context);
|
||||
static int up_interrupts(int irq, void *context, FAR void *arg);
|
||||
static int up_ioctl(struct file *filep, int cmd, unsigned long arg);
|
||||
static int up_receive(struct uart_dev_s *dev, uint32_t *status);
|
||||
static void up_rxint(struct uart_dev_s *dev, bool enable);
|
||||
@@ -688,11 +688,11 @@ static int up_attach(struct uart_dev_s *dev)
|
||||
* disabled in the C2 register.
|
||||
*/
|
||||
|
||||
ret = irq_attach(priv->irqs, up_interrupts);
|
||||
ret = irq_attach(priv->irqs, up_interrupts, NULL);
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
if (ret == OK)
|
||||
{
|
||||
ret = irq_attach(priv->irqe, up_interrupt);
|
||||
ret = irq_attach(priv->irqe, up_interrupt, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -747,7 +747,7 @@ static void up_detach(struct uart_dev_s *dev)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
static int up_interrupt(int irq, void *context)
|
||||
static int up_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
struct uart_dev_s *dev = NULL;
|
||||
struct up_dev_s *priv;
|
||||
@@ -835,7 +835,7 @@ static int up_interrupt(int irq, void *context)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int up_interrupts(int irq, void *context)
|
||||
static int up_interrupts(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
struct uart_dev_s *dev = NULL;
|
||||
struct up_dev_s *priv;
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int kinetis_timerisr(int irq, uint32_t *regs)
|
||||
static int kinetis_timerisr(int irq, uint32_t *regs, FAR void *arg)
|
||||
{
|
||||
/* Process timer interrupt */
|
||||
|
||||
@@ -139,7 +139,7 @@ void arm_timer_initialize(void)
|
||||
|
||||
/* Attach the timer interrupt vector */
|
||||
|
||||
(void)irq_attach(KINETIS_IRQ_SYSTICK, (xcpt_t)kinetis_timerisr);
|
||||
(void)irq_attach(KINETIS_IRQ_SYSTICK, (xcpt_t)kinetis_timerisr, NULL);
|
||||
|
||||
/* Enable SysTick interrupts */
|
||||
|
||||
|
||||
@@ -562,7 +562,7 @@ static void khci_ep0outcomplete(struct khci_usbdev_s *priv);
|
||||
static void khci_ep0incomplete(struct khci_usbdev_s *priv);
|
||||
static void khci_ep0transfer(struct khci_usbdev_s *priv,
|
||||
uint16_t ustat);
|
||||
static int khci_interrupt(int irq, void *context);
|
||||
static int khci_interrupt(int irq, void *context, FAR void *arg);
|
||||
|
||||
/* Endpoint helpers *********************************************************/
|
||||
|
||||
@@ -2713,7 +2713,7 @@ static void khci_ep0transfer(struct khci_usbdev_s *priv, uint16_t ustat)
|
||||
* Name: khci_interrupt
|
||||
****************************************************************************/
|
||||
|
||||
static int khci_interrupt(int irq, void *context)
|
||||
static int khci_interrupt(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
/* For now there is only one USB controller, but we will always refer to
|
||||
* it using a pointer to make any future ports to multiple USB controllers
|
||||
@@ -4444,7 +4444,7 @@ void up_usbinitialize(void)
|
||||
* them when we need them later.
|
||||
*/
|
||||
|
||||
if (irq_attach(KINETIS_IRQ_USBOTG, khci_interrupt) != 0)
|
||||
if (irq_attach(KINETIS_IRQ_USBOTG, khci_interrupt, NULL) != 0)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_IRQREGISTRATION),
|
||||
(uint16_t)KINETIS_IRQ_USBOTG);
|
||||
|
||||
@@ -164,14 +164,14 @@ static int kl_portinterrupt(int irq, FAR void *context,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_KL_PORTAINTS
|
||||
static int kl_portainterrupt(int irq, FAR void *context)
|
||||
static int kl_portainterrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
return kl_portinterrupt(irq, context, KL_PORTA_ISFR, g_portaisrs);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KL_PORTDINTS
|
||||
static int kl_portdinterrupt(int irq, FAR void *context)
|
||||
static int kl_portdinterrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
return kl_portinterrupt(irq, context, KL_PORTD_ISFR, g_portdisrs);
|
||||
}
|
||||
@@ -193,13 +193,13 @@ static int kl_portdinterrupt(int irq, FAR void *context)
|
||||
void kl_gpioirqinitialize(void)
|
||||
{
|
||||
#ifdef CONFIG_KL_PORTAINTS
|
||||
(void)irq_attach(KL_IRQ_PORTA, kl_portainterrupt);
|
||||
(void)irq_attach(KL_IRQ_PORTA, kl_portainterrupt, NULL);
|
||||
putreg32(0xffffffff, KL_PORTA_ISFR);
|
||||
up_enable_irq(KL_IRQ_PORTA);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KL_PORTDINTS
|
||||
(void)irq_attach(KL_IRQ_PORTD, kl_portdinterrupt);
|
||||
(void)irq_attach(KL_IRQ_PORTD, kl_portdinterrupt, NULL);
|
||||
putreg32(0xffffffff, KL_PORTD_ISFR);
|
||||
up_enable_irq(KL_IRQ_PORTD);
|
||||
#endif
|
||||
|
||||
@@ -138,7 +138,7 @@ static void kl_dumpnvic(const char *msg, int irq)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
static int kl_nmi(int irq, FAR void *context)
|
||||
static int kl_nmi(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! NMI received\n");
|
||||
@@ -146,7 +146,7 @@ static int kl_nmi(int irq, FAR void *context)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int kl_pendsv(int irq, FAR void *context)
|
||||
static int kl_pendsv(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! PendSV received\n");
|
||||
@@ -154,7 +154,7 @@ static int kl_pendsv(int irq, FAR void *context)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int kl_reserved(int irq, FAR void *context)
|
||||
static int kl_reserved(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
_err("PANIC!!! Reserved interrupt\n");
|
||||
@@ -231,15 +231,15 @@ void up_irqinitialize(void)
|
||||
* under certain conditions.
|
||||
*/
|
||||
|
||||
irq_attach(KL_IRQ_SVCALL, up_svcall);
|
||||
irq_attach(KL_IRQ_HARDFAULT, up_hardfault);
|
||||
irq_attach(KL_IRQ_SVCALL, up_svcall, NULL);
|
||||
irq_attach(KL_IRQ_HARDFAULT, up_hardfault, NULL);
|
||||
|
||||
/* Attach all other processor exceptions (except reset and sys tick) */
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
irq_attach(KL_IRQ_NMI, kl_nmi);
|
||||
irq_attach(KL_IRQ_PENDSV, kl_pendsv);
|
||||
irq_attach(KL_IRQ_RESERVED, kl_reserved);
|
||||
irq_attach(KL_IRQ_NMI, kl_nmi, NULL);
|
||||
irq_attach(KL_IRQ_PENDSV, kl_pendsv, NULL);
|
||||
irq_attach(KL_IRQ_RESERVED, kl_reserved, NULL);
|
||||
#endif
|
||||
|
||||
kl_dumpnvic("initial", NR_IRQS);
|
||||
|
||||
@@ -171,7 +171,7 @@ static int up_setup(struct uart_dev_s *dev);
|
||||
static void up_shutdown(struct uart_dev_s *dev);
|
||||
static int up_attach(struct uart_dev_s *dev);
|
||||
static void up_detach(struct uart_dev_s *dev);
|
||||
static int up_interrupts(int irq, void *context);
|
||||
static int up_interrupts(int irq, void *context, FAR void *arg);
|
||||
static int up_ioctl(struct file *filep, int cmd, unsigned long arg);
|
||||
static int up_receive(struct uart_dev_s *dev, uint32_t *status);
|
||||
static void up_rxint(struct uart_dev_s *dev, bool enable);
|
||||
@@ -455,7 +455,7 @@ static int up_attach(struct uart_dev_s *dev)
|
||||
* disabled in the C2 register.
|
||||
*/
|
||||
|
||||
ret = irq_attach(priv->irq, up_interrupts);
|
||||
ret = irq_attach(priv->irq, up_interrupts, NULL);
|
||||
if (ret == OK)
|
||||
{
|
||||
up_enable_irq(priv->irq);
|
||||
@@ -500,7 +500,7 @@ static void up_detach(struct uart_dev_s *dev)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int up_interrupts(int irq, void *context)
|
||||
static int up_interrupts(int irq, void *context, FAR void *arg)
|
||||
{
|
||||
struct uart_dev_s *dev = NULL;
|
||||
struct up_dev_s *priv;
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int kl_timerisr(int irq, uint32_t *regs)
|
||||
static int kl_timerisr(int irq, uint32_t *regs, FAR void *arg)
|
||||
{
|
||||
/* Process timer interrupt */
|
||||
|
||||
@@ -143,7 +143,7 @@ void arm_timer_initialize(void)
|
||||
|
||||
/* Attach the timer interrupt vector */
|
||||
|
||||
(void)irq_attach(KL_IRQ_SYSTICK, (xcpt_t)kl_timerisr);
|
||||
(void)irq_attach(KL_IRQ_SYSTICK, (xcpt_t)kl_timerisr, NULL);
|
||||
|
||||
/* Enable SysTick interrupts. "The CLKSOURCE bit in SysTick Control and
|
||||
* Status register selects either the core clock (when CLKSOURCE = 1) or
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user