mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
Add an instance argument to the SPIDEV definitions.
This commit is contained in:
@@ -419,7 +419,7 @@ void xen1210_getdata(FAR struct xen1210_dev_s *priv)
|
||||
|
||||
/* Select the XEN1210 */
|
||||
|
||||
SPI_SELECT(priv->spi, SPIDEV_ACCELEROMETER, true);
|
||||
SPI_SELECT(priv->spi, SPIDEV_ACCELEROMETER(0), true);
|
||||
|
||||
/* Read three times 3 bytes = 24 bits * 3 */
|
||||
|
||||
@@ -434,7 +434,7 @@ void xen1210_getdata(FAR struct xen1210_dev_s *priv)
|
||||
|
||||
/* Deselect the XEN1210 */
|
||||
|
||||
SPI_SELECT(priv->spi, SPIDEV_ACCELEROMETER, false);
|
||||
SPI_SELECT(priv->spi, SPIDEV_ACCELEROMETER(0), false);
|
||||
|
||||
/* Unlock bus */
|
||||
|
||||
@@ -472,7 +472,7 @@ void xen1210_putdata(FAR struct xen1210_dev_s *priv, uint32_t regval)
|
||||
|
||||
/* Select the XEN1210 */
|
||||
|
||||
SPI_SELECT(priv->spi, SPIDEV_ACCELEROMETER, true);
|
||||
SPI_SELECT(priv->spi, SPIDEV_ACCELEROMETER(0), true);
|
||||
|
||||
/* We need to write to 3 sensors in the daisy-chain */
|
||||
/* Write three times 3 bytes */
|
||||
@@ -483,7 +483,7 @@ void xen1210_putdata(FAR struct xen1210_dev_s *priv, uint32_t regval)
|
||||
|
||||
/* Deselect the XEN1210 */
|
||||
|
||||
SPI_SELECT(priv->spi, SPIDEV_ACCELEROMETER, false);
|
||||
SPI_SELECT(priv->spi, SPIDEV_ACCELEROMETER(0), false);
|
||||
|
||||
/* Unlock bus */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user