From c7264eb5507cee8203d16641902c5f6329c3ad64 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 29 Apr 2017 12:28:19 -0600 Subject: [PATCH] Add an instance argument to the SPIDEV definitions. --- drivers/wireless/ieee802154/at86rf23x.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/wireless/ieee802154/at86rf23x.c b/drivers/wireless/ieee802154/at86rf23x.c index e3429c4d1f..8037c4005a 100644 --- a/drivers/wireless/ieee802154/at86rf23x.c +++ b/drivers/wireless/ieee802154/at86rf23x.c @@ -265,9 +265,9 @@ static void at86rf23x_setreg(FAR struct spi_dev_s *spi, uint32_t addr, reg[1] = val; at86rf23x_lock(spi); - SPI_SELECT(spi, SPIDEV_IEEE802154, true); + SPI_SELECT(spi, SPIDEV_IEEE802154(0), true); SPI_SNDBLOCK(spi, reg, 2); - SPI_SELECT(spi, SPIDEV_IEEE802154, false); + SPI_SELECT(spi, SPIDEV_IEEE802154(0), false); at86rf23x_unlock(spi); wlinfo("0x%02X->r[0x%02X]\n", val, addr); @@ -292,9 +292,9 @@ static uint8_t at86rf23x_getreg(FAR struct spi_dev_s *spi, uint32_t addr) at86rf23x_lock (spi); - SPI_SELECT(spi, SPIDEV_IEEE802154, true); + SPI_SELECT(spi, SPIDEV_IEEE802154(0), true); SPI_EXCHANGE(spi, reg, val, 2); - SPI_SELECT(spi, SPIDEV_IEEE802154, false); + SPI_SELECT(spi, SPIDEV_IEEE802154(0), false); at86rf23x_unlock(spi); @@ -359,12 +359,12 @@ static int at86rf23x_writeframe(FAR struct spi_dev_s *spi, FAR uint8_t *frame, at86rf23x_lock(spi); - SPI_SELECT(spi, SPIDEV_IEEE802154, true); + SPI_SELECT(spi, SPIDEV_IEEE802154(0), true); SPI_SNDBLOCK(spi, ®, 1); SPI_SNDBLOCK(spi, &frame, len); - SPI_SELECT(spi, SPIDEV_IEEE802154, false); + SPI_SELECT(spi, SPIDEV_IEEE802154(0), false); at86rf23x_unlock(spi); @@ -388,13 +388,13 @@ static uint8_t at86rf23x_readframe(FAR struct spi_dev_s *spi, reg = RF23X_SPI_FRAME_READ; at86rf23x_lock(spi); - SPI_SELECT(spi, SPIDEV_IEEE802154, true); + SPI_SELECT(spi, SPIDEV_IEEE802154(0), true); SPI_SNDBLOCK(spi, ®, 1); SPI_RECVBLOCK(spi, &len, 1); SPI_RECVBLOCK(spi, frame_rx, len+3); - SPI_SELECT(spi, SPIDEV_IEEE802154, false); + SPI_SELECT(spi, SPIDEV_IEEE802154(0), false); at86rf23x_unlock(spi); return len;