Fix some interrupt argument issues associated with NRF21L01

This commit is contained in:
Gregory Nutt 2017-02-27 12:06:15 -06:00
parent 840c5935a3
commit 6002393b2d
3 changed files with 9 additions and 6 deletions

View File

@ -57,7 +57,7 @@
* Private Function Prototypes
************************************************************************************/
static int stm32tiny_wl_irq_attach(xcpt_t isr);
static int stm32tiny_wl_irq_attach(xcpt_t isr, FAR void *arg);
static void stm32tiny_wl_chip_enable(bool enable);
@ -72,15 +72,17 @@ static FAR struct nrf24l01_config_s nrf_cfg =
};
static xcpt_t g_isr;
static FAR void *g_arg;
/************************************************************************************
* Private Functions
************************************************************************************/
static int stm32tiny_wl_irq_attach(xcpt_t isr)
static int stm32tiny_wl_irq_attach(xcpt_t isr, FAR void *arg)
{
_info("Attach IRQ\n");
g_isr = isr;
g_arg = arg;
stm32_gpiosetevent(GPIO_NRF24L01_IRQ, false, true, false, g_isr);
return OK;
}

View File

@ -60,8 +60,7 @@
* Private Function Prototypes
************************************************************************************/
static int stm32tiny_wl_irq_attach(xcpt_t isr);
static int stm32tiny_wl_irq_attach(xcpt_t isr, FAR void *arg);
static void stm32tiny_wl_chip_enable(bool enable);
/************************************************************************************
@ -75,15 +74,17 @@ static FAR struct nrf24l01_config_s nrf_cfg =
};
static xcpt_t g_isr;
static FAR void *g_arg;
/************************************************************************************
* Private Functions
************************************************************************************/
static int stm32tiny_wl_irq_attach(xcpt_t isr)
static int stm32tiny_wl_irq_attach(xcpt_t isr, FAR void *arg)
{
winfo("Attach IRQ\n");
g_isr = isr;
g_arg = arg;
stm32_gpiosetevent(GPIO_NRF24L01_IRQ, false, true, false, g_isr);
return OK;
}

View File

@ -199,7 +199,7 @@ struct nrf24l01_config_s
* chipenable - Enable or disable the chip (CE line)
*/
int (*irqattach)(xcpt_t isr);
int (*irqattach)(xcpt_t isr, FAR void *arg);
void (*chipenable)(bool enable);
};