mirror of
https://github.com/apache/nuttx.git
synced 2026-10-12 00:30:23 +00:00
ADXL345: Don't select device if only change SPI settings
This commit is contained in:
parent
d27fb63862
commit
8e4f7230f9
2 changed files with 0 additions and 4 deletions
|
|
@ -417,11 +417,9 @@ ADXL345_HANDLE adxl345_instantiate(FAR struct i2c_dev_s *dev,
|
|||
#ifdef CONFIG_SPI_OWNBUS
|
||||
/* Configure SPI for the ADXL345 */
|
||||
|
||||
SPI_SELECT(priv->spi, SPIDEV_GSENSOR, true);
|
||||
SPI_SETMODE(priv->spi, SPIDEV_MODE3);
|
||||
SPI_SETBITS(priv->spi, 8);
|
||||
SPI_SETFREQUENCY(priv->spi, ADXL345_SPI_MAXFREQUENCY);
|
||||
SPI_SELECT(priv->spi, SPIDEV_GSENSOR, false);
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -68,11 +68,9 @@ static inline void adxl345_configspi(FAR struct spi_dev_s *spi)
|
|||
{
|
||||
/* Configure SPI for the ADXL345 */
|
||||
|
||||
SPI_SELECT(spi, SPIDEV_GSENSOR, true);
|
||||
SPI_SETMODE(spi, SPIDEV_MODE3);
|
||||
SPI_SETBITS(spi, 8);
|
||||
SPI_SETFREQUENCY(spi, ADXL345_SPI_MAXFREQUENCY);
|
||||
SPI_SELECT(spi, SPIDEV_GSENSOR, false);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue