mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 18:58:27 +08:00
ENC28J60: Update interface to use newer parameter passing to interrupt handlers
This commit is contained in:
@@ -1833,7 +1833,10 @@ static void enc_irqworker(FAR void *arg)
|
||||
|
||||
static int enc_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
register FAR struct enc_driver_s *priv = &g_enc28j60[0];
|
||||
FAR struct enc_driver_s *priv;
|
||||
|
||||
DEBUGASSERT(arg != NULL);
|
||||
priv = (FAR struct enc_driver_s *)arg;
|
||||
|
||||
/* In complex environments, we cannot do SPI transfers from the interrupt
|
||||
* handler because semaphores are probably used to lock the SPI bus. In
|
||||
@@ -2648,7 +2651,7 @@ int enc_initialize(FAR struct spi_dev_s *spi,
|
||||
|
||||
/* Attach the interrupt to the driver (but don't enable it yet) */
|
||||
|
||||
if (lower->attach(lower, enc_interrupt))
|
||||
if (lower->attach(lower, enc_interrupt, priv) < 0)
|
||||
{
|
||||
/* We could not attach the ISR to the interrupt */
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/****************************************************************************
|
||||
* drivers/net/encx24j600.c
|
||||
*
|
||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2013-2014 UVC Ingenieure. All rights reserved.
|
||||
* Author: Max Holtzberg <mh@uvc.de>
|
||||
*
|
||||
@@ -1976,7 +1977,7 @@ static void enc_irqworker(FAR void *arg)
|
||||
|
||||
static int enc_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
FAR struct enc_driver_s *priv = &g_encx24j600[0];
|
||||
FAR struct enc_driver_s *priv;
|
||||
|
||||
DEBUGASSERT(arg != NULL);
|
||||
priv = (FAR struct enc_driver_s *)arg;
|
||||
|
||||
Reference in New Issue
Block a user