mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user