mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
Fix some interrupt argument issues associated with NRF21L01
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user