mirror of
https://github.com/apache/nuttx.git
synced 2026-05-09 23:12:17 +08:00
drivers/spi: Add SPIDEV_MAG_ENCODER() definition
This definition is needed to have multiplese Magnetic Sensors in the same board. Signed-off-by: Alan C. Assis <acassis@gmail.com>
This commit is contained in:
committed by
Alan C. Assis
parent
f8e78c1075
commit
04d5cad64e
@@ -478,6 +478,7 @@
|
||||
#define SPIDEV_ADC(n) SPIDEV_ID(SPIDEVTYPE_ADC, (n))
|
||||
#define SPIDEV_MOTOR(n) SPIDEV_ID(SPIDEVTYPE_MOTOR, (n))
|
||||
#define SPIDEV_IMU(n) SPIDEV_ID(SPIDEVTYPE_IMU, (n))
|
||||
#define SPIDEV_MAG_ENCODER(n) SPIDEV_ID(SPIDEVTYPE_MAG_ENCODER, (n))
|
||||
#define SPIDEV_USER(n) SPIDEV_ID(SPIDEVTYPE_USER, (n))
|
||||
|
||||
/****************************************************************************
|
||||
@@ -519,6 +520,7 @@ enum spi_devtype_e
|
||||
SPIDEVTYPE_ADC, /* Select SPI ADC device */
|
||||
SPIDEVTYPE_MOTOR, /* Select SPI motor device */
|
||||
SPIDEVTYPE_IMU, /* Select SPI IMU device */
|
||||
SPIDEVTYPE_MAG_ENCODER, /* Select SPI Magnetic Encoder device */
|
||||
SPIDEVTYPE_USER /* Board-specific values start here
|
||||
* This must always be the last definition. */
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user