All SPI-based device drivers needs to call SPI_HWFEATURES() with zero in order to co-exist with drivers that use H/W features

This commit is contained in:
Gregory Nutt 2016-01-23 16:18:13 -06:00
parent c36c49657b
commit f6e49caba8
35 changed files with 88 additions and 42 deletions

@ -1 +1 @@
Subproject commit 06c7256f4ece872da23f96e1e587e86e0ba89271
Subproject commit 66325b8ab4f012c1261e88ae262d5cd2e3d54fd1

View File

@ -203,6 +203,7 @@ static void adc_reset(FAR struct adc_dev_s *dev)
SPI_SETMODE(spi, SPIDEV_MODE1);
SPI_SETBITS(spi, 8);
(void)SPI_HWFEATURES(spi, 0);
SPI_SETFREQUENCY(spi, CONFIG_ADS1255_FREQUENCY);
usleep(1000);
SPI_SELECT(spi, priv->devno, true);

View File

@ -155,6 +155,7 @@ static void pga11x_configure(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_PGA11X_SPIMODE);
SPI_SETBITS(spi, 8);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_PGA11X_SPIFREQUENCY);
}

View File

@ -274,6 +274,7 @@ static void vs1053_spi_lock(FAR struct spi_dev_s *dev, unsigned long freq_mhz)
SPI_SETMODE(dev, CONFIG_VS1053_SPIMODE);
SPI_SETBITS(dev, 8);
(void)SPI_HWFEATURES(dev, 0);
(void)SPI_SETFREQUENCY(dev, freq_mhz);
}

View File

@ -288,6 +288,7 @@ static void ee25xx_lock(FAR struct spi_dev_s *dev)
SPI_SETMODE(dev, CONFIG_EE25XX_SPIMODE);
SPI_SETBITS(dev, 8);
(void)SPI_HWFEATURES(dev, 0);
(void)SPI_SETFREQUENCY(dev, 10000000); /* This is the default speed */
}

View File

@ -197,7 +197,8 @@ static void ads7843e_lock(FAR struct spi_dev_s *spi)
SPI_SELECT(spi, SPIDEV_TOUCHSCREEN, true);
SPI_SETMODE(spi, CONFIG_ADS7843E_SPIMODE);
SPI_SETBITS(spi, 8);
SPI_SETFREQUENCY(spi, CONFIG_ADS7843E_FREQUENCY);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_ADS7843E_FREQUENCY);
SPI_SELECT(spi, SPIDEV_TOUCHSCREEN, false);
}
#endif
@ -258,7 +259,8 @@ static inline void ads7843e_configspi(FAR struct spi_dev_s *spi)
SPI_SELECT(spi, SPIDEV_TOUCHSCREEN, true);
SPI_SETMODE(spi, CONFIG_ADS7843E_SPIMODE);
SPI_SETBITS(spi, 8);
SPI_SETFREQUENCY(spi, CONFIG_ADS7843E_FREQUENCY);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_ADS7843E_FREQUENCY);
SPI_SELECT(spi, SPIDEV_TOUCHSCREEN, false);
}
#endif

View File

@ -197,7 +197,8 @@ static void max11802_lock(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_MAX11802_SPIMODE);
SPI_SETBITS(spi, 8);
SPI_SETFREQUENCY(spi, CONFIG_MAX11802_FREQUENCY);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_MAX11802_FREQUENCY);
}
#endif
@ -256,7 +257,8 @@ static inline void max11802_configspi(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_MAX11802_SPIMODE);
SPI_SETBITS(spi, 8);
SPI_SETFREQUENCY(spi, CONFIG_MAX11802_FREQUENCY);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_MAX11802_FREQUENCY);
}
#endif

View File

@ -299,10 +299,11 @@ static inline void memlcd_configspi(FAR struct spi_dev_s *spi)
#ifdef CONFIG_SPI_OWNBUS
SPI_SETMODE(spi, MEMLCD_SPI_MODE);
SPI_SETBITS(spi, MEMLCD_SPI_BITS);
(void)SPI_HWFEATURES(spi, 0);
# ifdef CONFIG_MEMLCD_SPI_FREQUENCY
SPI_SETFREQUENCY(spi, CONFIG_MEMLCD_SPI_FREQUENCY);
(void)SPI_SETFREQUENCY(spi, CONFIG_MEMLCD_SPI_FREQUENCY);
# else
SPI_SETFREQUENCY(spi, MEMLCD_SPI_FREQUENCY);
(void)SPI_SETFREQUENCY(spi, MEMLCD_SPI_FREQUENCY);
# endif
#endif
}
@ -344,10 +345,11 @@ static void memlcd_select(FAR struct spi_dev_s *spi)
*/
SPI_SETMODE(spi, MEMLCD_SPI_MODE);
SPI_SETBITS(spi, MEMLCD_SPI_BITS);
(void)SPI_HWFEATURES(spi, 0);
# ifdef CONFIG_MEMLCD_SPI_FREQUENCY
SPI_SETFREQUENCY(spi, CONFIG_MEMLCD_SPI_FREQUENCY);
(void)SPI_SETFREQUENCY(spi, CONFIG_MEMLCD_SPI_FREQUENCY);
# else
SPI_SETFREQUENCY(spi, MEMLCD_SPI_FREQUENCY);
(void)SPI_SETFREQUENCY(spi, MEMLCD_SPI_FREQUENCY);
# endif
}
#endif

View File

@ -678,7 +678,8 @@ static inline void nokia_configspi(FAR struct spi_dev_s *spi)
#ifdef CONFIG_SPI_OWNBUS
SPI_SETMODE(spi, CONFIG_NOKIA6100_SPIMODE);
SPI_SETBITS(spi, CONFIG_NOKIA6100_WORDWIDTH);
SPI_SETFREQUENCY(spi, CONFIG_NOKIA6100_FREQUENCY)
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_NOKIA6100_FREQUENCY)
#endif
}
@ -723,7 +724,8 @@ static void nokia_select(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_NOKIA6100_SPIMODE);
SPI_SETBITS(spi, CONFIG_NOKIA6100_WORDWIDTH);
SPI_SETFREQUENCY(spi, CONFIG_NOKIA6100_FREQUENCY);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_NOKIA6100_FREQUENCY);
}
#endif

View File

@ -460,8 +460,9 @@ static inline void rit_configspi(FAR struct spi_dev_s *spi)
#ifdef CONFIG_SPI_OWNBUS
SPI_SETMODE(spi, CONFIG_P14201_SPIMODE);
SPI_SETBITS(spi, 8);
(void)SPI_HWFEATURES(spi, 0);
#ifdef CONFIG_P14201_FREQUENCY
SPI_SETFREQUENCY(spi, CONFIG_P14201_FREQUENCY)
(void)SPI_SETFREQUENCY(spi, CONFIG_P14201_FREQUENCY)
#endif
#endif
}
@ -505,8 +506,9 @@ static void rit_select(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_P14201_SPIMODE);
SPI_SETBITS(spi, 8);
(void)SPI_HWFEATURES(spi, 0);
#ifdef CONFIG_P14201_FREQUENCY
SPI_SETFREQUENCY(spi, CONFIG_P14201_FREQUENCY);
(void)SPI_SETFREQUENCY(spi, CONFIG_P14201_FREQUENCY);
#endif
}
#endif

View File

@ -824,15 +824,16 @@ FAR struct lcd_dev_s *ssd1306_initialize(FAR struct i2c_dev_s *dev, unsigned int
*/
# ifdef CONFIG_SPI_OWNBUS
/* Configure SPI */
/* Configure SPI */
SPI_SETMODE(priv->spi, CONFIG_SSD1306_SPIMODE);
SPI_SETBITS(priv->spi, 8);
SPI_SETFREQUENCY(priv->spi, CONFIG_SSD1306_FREQUENCY);
SPI_SETMODE(priv->spi, CONFIG_SSD1306_SPIMODE);
SPI_SETBITS(priv->spi, 8);
(void)SPI_HWFEATURES(priv->spi, 0);
(void)SPI_SETFREQUENCY(priv->spi, CONFIG_SSD1306_FREQUENCY);
# else
/* Configure the SPI */
/* Configure the SPI */
ssd1306_configspi(priv->spi);
ssd1306_configspi(priv->spi);
# endif
#else

View File

@ -71,7 +71,8 @@ static inline void ssd1306_configspi(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_SSD1306_SPIMODE);
SPI_SETBITS(spi, 8);
SPI_SETFREQUENCY(spi, CONFIG_SSD1306_FREQUENCY);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_SSD1306_FREQUENCY);
}
#endif

View File

@ -510,7 +510,8 @@ static void ssd1351_select(FAR struct ssd1351_dev_s *priv)
#ifndef CONFIG_SPI_OWNBUS
SPI_SETMODE(spi, CONFIG_SSD1351_SPIMODE);
SPI_SETBITS(spi, SSD1351_SPIBITS);
SPI_SETFREQUENCY(spi, CONFIG_SSD1351_SPIFREQ);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_SSD1351_SPIFREQ);
#endif
}
#endif
@ -1196,7 +1197,8 @@ FAR struct lcd_dev_s *ssd1351_initialize(FAR struct spi_dev_s *spi,
#ifdef CONFIG_SPI_OWNBUS
SPI_SETMODE(spi, CONFIG_SSD1351_SPIMODE);
SPI_SETBITS(spi, SSD1351_SPIBITS);
SPI_SETFREQUENCY(spi, CONFIG_SSD1351_SPIFREQ);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_SSD1351_SPIFREQ);
#endif
#endif

View File

@ -394,8 +394,9 @@ static void st7567_select(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_ST7567_SPIMODE);
SPI_SETBITS(spi, 8);
(void)SPI_HWFEATURES(spi, 0);
#ifdef CONFIG_ST7567_FREQUENCY
SPI_SETFREQUENCY(spi, CONFIG_ST7567_FREQUENCY);
(void)SPI_SETFREQUENCY(spi, CONFIG_ST7567_FREQUENCY);
#endif
}
#endif

View File

@ -436,7 +436,8 @@ static inline void ug2864ambag01_configspi(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_UG2864AMBAG01_SPIMODE);
SPI_SETBITS(spi, 8);
SPI_SETFREQUENCY(spi, CONFIG_UG2864AMBAG01_FREQUENCY);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_UG2864AMBAG01_FREQUENCY);
}
#endif
@ -469,7 +470,8 @@ static inline void ug2864ambag01_lock(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_UG2864AMBAG01_SPIMODE);
SPI_SETBITS(spi, 8);
SPI_SETFREQUENCY(spi, CONFIG_UG2864AMBAG01_FREQUENCY);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_UG2864AMBAG01_FREQUENCY);
}
#endif

View File

@ -438,8 +438,9 @@ static void ug_select(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_UG9664HSWAG01_SPIMODE);
SPI_SETBITS(spi, 8);
(void)SPI_HWFEATURES(spi, 0);
#ifdef CONFIG_UG9664HSWAG01_FREQUENCY
SPI_SETFREQUENCY(spi, CONFIG_UG9664HSWAG01_FREQUENCY);
(void)SPI_SETFREQUENCY(spi, CONFIG_UG9664HSWAG01_FREQUENCY);
#endif
}
#endif

View File

@ -365,9 +365,10 @@ static void mmcsd_semtake(FAR struct mmcsd_slot_s *slot)
* changed those since the last time that we had the SPI bus.
*/
SPI_SETFREQUENCY(slot->spi, slot->spispeed);
SPI_SETMODE(slot->spi, CONFIG_MMCSD_SPIMODE);
SPI_SETBITS(slot->spi, 8);
(void)SPI_HWFEATURES(slot->spi, 0);
(void)SPI_SETFREQUENCY(slot->spi, slot->spispeed);
#endif
/* Get exclusive access to the MMC/SD device (possibly unnecessary if
@ -425,6 +426,7 @@ static inline void mmcsd_spiinit(FAR struct mmcsd_slot_s *slot)
{
SPI_SETMODE(slot->spi, CONFIG_MMCSD_SPIMODE);
SPI_SETBITS(slot->spi, 8);
(void)SPI_HWFEATURES(slot->spi, 0);
}
#endif
@ -1608,7 +1610,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
#ifndef CONFIG_SPI_OWNBUS
slot->spispeed = MMCSD_IDMODE_CLOCK;
#endif
SPI_SETFREQUENCY(spi, MMCSD_IDMODE_CLOCK);
(void)SPI_SETFREQUENCY(spi, MMCSD_IDMODE_CLOCK);
/* Set the maximum access time out */

View File

@ -191,6 +191,7 @@ static void at25_lock(FAR struct spi_dev_s *dev)
SPI_SETMODE(dev, CONFIG_AT25_SPIMODE);
SPI_SETBITS(dev, 8);
(void)SPI_HWFEATURES(dev, 0);
(void)SPI_SETFREQUENCY(dev, CONFIG_AT25_SPIFREQUENCY);
}

View File

@ -292,6 +292,7 @@ static void at45db_lock(FAR struct at45db_dev_s *priv)
SPI_SETMODE(priv->spi, SPIDEV_MODE0);
SPI_SETBITS(priv->spi, 8);
(void)SPI_HWFEATURES(priv->spi, 0);
(void)SPI_SETFREQUENCY(priv->spi, CONFIG_AT45DB_FREQUENCY);
}

View File

@ -284,6 +284,7 @@ static void m25p_lock(FAR struct spi_dev_s *dev)
SPI_SETMODE(dev, CONFIG_M25P_SPIMODE);
SPI_SETBITS(dev, 8);
(void)SPI_HWFEATURES(dev, 0);
(void)SPI_SETFREQUENCY(dev, 20000000);
}

View File

@ -343,6 +343,7 @@ static void ramtron_lock(FAR struct ramtron_dev_s *priv)
SPI_SETMODE(dev, SPIDEV_MODE3);
SPI_SETBITS(dev, 8);
(void)SPI_HWFEATURES(dev, 0);
(void)SPI_SETFREQUENCY(dev, priv->speed);
}

View File

@ -286,6 +286,7 @@ static void sst25_lock(FAR struct spi_dev_s *dev)
SPI_SETMODE(dev, CONFIG_SST25_SPIMODE);
SPI_SETBITS(dev, 8);
(void)SPI_HWFEATURES(dev, 0);
(void)SPI_SETFREQUENCY(dev, CONFIG_SST25_SPIFREQUENCY);
}

View File

@ -236,6 +236,7 @@ static void sst25xx_lock(FAR struct spi_dev_s *dev)
SPI_SETMODE(dev, CONFIG_SST25XX_SPIMODE);
SPI_SETBITS(dev, 8);
(void)SPI_HWFEATURES(dev, 0);
(void)SPI_SETFREQUENCY(dev, CONFIG_SST25XX_SPIFREQUENCY);
}

View File

@ -310,6 +310,7 @@ static void w25_lock(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_W25_SPIMODE);
SPI_SETBITS(spi, 8);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_W25_SPIFREQUENCY);
}

View File

@ -381,7 +381,8 @@ static inline void enc_configspi(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_ENC28J60_SPIMODE);
SPI_SETBITS(spi, 8);
SPI_SETFREQUENCY(spi, CONFIG_ENC28J60_FREQUENCY);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_ENC28J60_FREQUENCY);
}
#endif
@ -416,7 +417,8 @@ static void enc_lock(FAR struct enc_driver_s *priv)
SPI_SETMODE(priv->spi, CONFIG_ENC28J60_SPIMODE);
SPI_SETBITS(priv->spi, 8);
SPI_SETFREQUENCY(priv->spi, CONFIG_ENC28J60_FREQUENCY);
(void)SPI_HWFEATURES(priv->spi, 0);
(void)SPI_SETFREQUENCY(priv->spi, CONFIG_ENC28J60_FREQUENCY);
}
#endif

View File

@ -404,7 +404,8 @@ static inline void enc_configspi(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_ENCX24J600_SPIMODE);
SPI_SETBITS(spi, 8);
SPI_SETFREQUENCY(spi, CONFIG_ENCX24J600_FREQUENCY);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_ENCX24J600_FREQUENCY);
}
#endif
@ -439,7 +440,8 @@ static void enc_lock(FAR struct enc_driver_s *priv)
SPI_SETMODE(priv->spi, CONFIG_ENCX24J600_SPIMODE);
SPI_SETBITS(priv->spi, 8);
SPI_SETFREQUENCY(priv->spi, CONFIG_ENCX24J600_FREQUENCY);
(void)SPI_HWFEATURES(priv->spi, 0);
(void)SPI_SETFREQUENCY(priv->spi, CONFIG_ENCX24J600_FREQUENCY);
}
#endif

View File

@ -419,7 +419,8 @@ ADXL345_HANDLE adxl345_instantiate(FAR struct i2c_dev_s *dev,
SPI_SETMODE(priv->spi, SPIDEV_MODE3);
SPI_SETBITS(priv->spi, 8);
SPI_SETFREQUENCY(priv->spi, ADXL345_SPI_MAXFREQUENCY);
(void)SPI_HWFEATURES(priv->spi, 0);
(void)SPI_SETFREQUENCY(priv->spi, ADXL345_SPI_MAXFREQUENCY);
#endif
#else

View File

@ -71,7 +71,8 @@ static inline void adxl345_configspi(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, SPIDEV_MODE3);
SPI_SETBITS(spi, 8);
SPI_SETFREQUENCY(spi, ADXL345_SPI_MAXFREQUENCY);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, ADXL345_SPI_MAXFREQUENCY);
}
#endif

View File

@ -284,7 +284,8 @@ int max31855_register(FAR const char *devpath, FAR struct spi_dev_s *spi)
SPI_SETMODE(priv->spi, SPIDEV_MODE1);
SPI_SETBITS(priv->spi, 8);
SPI_SETFREQUENCY(priv->spi, MAX31855_SPI_MAXFREQ);
(void)SPI_HWFEATURES(priv->spi, 0);
(void)SPI_SETFREQUENCY(priv->spi, MAX31855_SPI_MAXFREQ);
#endif
/* Register the character driver */

View File

@ -261,7 +261,8 @@ int max6675_register(FAR const char *devpath, FAR struct spi_dev_s *spi)
SPI_SETMODE(priv->spi, SPIDEV_MODE1);
SPI_SETBITS(priv->spi, 8);
SPI_SETFREQUENCY(priv->spi, MAX6675_SPI_MAXFREQ);
(void)SPI_HWFEATURES(priv->spi, 0);
(void)SPI_SETFREQUENCY(priv->spi, MAX6675_SPI_MAXFREQ);
#endif
/* Register the character driver */

View File

@ -119,7 +119,8 @@ static inline void mpl115a_configspi(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, SPIDEV_MODE0);
SPI_SETBITS(spi, 8);
SPI_SETFREQUENCY(spi, MPL115A_SPI_MAXFREQUENCY);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, MPL115A_SPI_MAXFREQUENCY);
}
#endif

View File

@ -313,6 +313,7 @@ void cc1101_access_begin(FAR struct cc1101_dev_s * dev)
SPI_SELECT(dev->spi, SPIDEV_WIRELESS, true);
SPI_SETMODE(dev->spi, SPIDEV_MODE0); /* CPOL=0, CPHA=0 */
SPI_SETBITS(dev->spi, 8);
(void)SPI_HWFEATURES(dev->spi, 0);
}
void cc1101_access_end(FAR struct cc1101_dev_s * dev)

View File

@ -259,7 +259,8 @@ static inline void cc3000_configspi(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_CC3000_SPI_MODE);
SPI_SETBITS(spi, 8);
SPI_SETFREQUENCY(spi, CONFIG_CC3000_SPI_FREQUENCY);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_CC3000_SPI_FREQUENCY);
}
/****************************************************************************

View File

@ -267,7 +267,8 @@ static void nrf24l01_lock(FAR struct spi_dev_s *spi)
SPI_SELECT(spi, SPIDEV_WIRELESS, true);
SPI_SETMODE(spi, SPIDEV_MODE0);
SPI_SETBITS(spi, 8);
SPI_SETFREQUENCY(spi, NRF24L01_SPIFREQ);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, NRF24L01_SPIFREQ);
SPI_SELECT(spi, SPIDEV_WIRELESS, false);
}
#endif
@ -328,7 +329,8 @@ static inline void nrf24l01_configspi(FAR struct spi_dev_s *spi)
SPI_SELECT(spi, SPIDEV_WIRELESS, true); /* Useful ? */
SPI_SETMODE(spi, SPIDEV_MODE0);
SPI_SETBITS(spi, 8);
SPI_SETFREQUENCY(spi, NRF24L01_SPIFREQ);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, NRF24L01_SPIFREQ);
SPI_SELECT(spi, SPIDEV_WIRELESS, false);
}
#endif

View File

@ -150,7 +150,8 @@ static void pn532_lock(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, SPIDEV_MODE0);
SPI_SETBITS(spi, -8);
SPI_SETFREQUENCY(spi, CONFIG_PN532_SPI_FREQ);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_PN532_SPI_FREQ);
}
#endif
@ -170,7 +171,8 @@ static inline void pn532_configspi(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, SPIDEV_MODE0);
SPI_SETBITS(spi, -8);
SPI_SETFREQUENCY(spi, CONFIG_PN532_SPI_FREQ);
(void)SPI_HWFEATURES(spi, 0);
(void)SPI_SETFREQUENCY(spi, CONFIG_PN532_SPI_FREQ);
}
#endif