This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 04d5cad64e9c03b4101375110c78b87e9d2afcf8 Author: Alan Carvalho de Assis <[email protected]> AuthorDate: Sat Apr 25 16:52:34 2026 -0300 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 <[email protected]> --- include/nuttx/spi/spi.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/nuttx/spi/spi.h b/include/nuttx/spi/spi.h index a8ff32c04d1..574d733fd4f 100644 --- a/include/nuttx/spi/spi.h +++ b/include/nuttx/spi/spi.h @@ -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. */ };
