This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch releases/12.10
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/releases/12.10 by this push:
new 6fc5b3e9dc drivers/sensors/CMakeLists.txt: Aligned Cmake with Make
6fc5b3e9dc is described below
commit 6fc5b3e9dc51dcda46d99519f72b7f2ec6db2e64
Author: simbit18 <[email protected]>
AuthorDate: Tue Jun 24 18:09:53 2025 +0200
drivers/sensors/CMakeLists.txt: Aligned Cmake with Make
Add:
Adafruit NAU7802 ADC sensor
MCP9600 Thermocouple Amplifier
Maxim MAX31865
Removed repeated addition of the Rohm BH1749NUC Color Sensor
Signed-off-by: simbit18 <[email protected]>
---
drivers/sensors/CMakeLists.txt | 70 +++++++++++++++++++++++++-----------------
1 file changed, 41 insertions(+), 29 deletions(-)
diff --git a/drivers/sensors/CMakeLists.txt b/drivers/sensors/CMakeLists.txt
index 5db532c7e9..539acdf13b 100644
--- a/drivers/sensors/CMakeLists.txt
+++ b/drivers/sensors/CMakeLists.txt
@@ -20,6 +20,8 @@
#
#
##############################################################################
+# Include sensor drivers
+
if(CONFIG_SENSORS)
set(SRCS sensor.c)
@@ -31,6 +33,10 @@ if(CONFIG_SENSORS)
list(APPEND SRCS sensor_rpmsg.c)
endif()
+ if(CONFIG_SENSORS_NAU7802)
+ list(APPEND SRCS nau7802.c)
+ endif()
+
if(CONFIG_SENSORS_GNSS)
set_source_files_properties(
gnss_uorb.c DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/..
@@ -62,23 +68,12 @@ if(CONFIG_SENSORS)
list(APPEND SRCS adxl345_base.c)
endif()
- if(CONFIG_SENSORS_ADXL362)
- list(APPEND SRCS adxl362_uorb.c)
- endif()
-
- if(CONFIG_SENSORS_BH1749NUC)
- list(APPEND SRCS bh1749nuc_base.c)
- if(CONFIG_SENSORS_BH1749NUC_UORB)
- list(APPEND SRCS bh1749nuc_uorb.c)
- else()
- list(APPEND SRCS bh1749nuc.c)
- endif()
- endif()
-
if(CONFIG_SENSORS_DHTXX)
list(APPEND SRCS dhtxx.c)
endif()
+ # These drivers can be used with sensor connected over SPI or I2C bus
+
if(CONFIG_SENSORS_BMI270)
list(APPEND SRCS bmi270_base.c)
if(CONFIG_SENSORS_BMI270_UORB)
@@ -166,7 +161,12 @@ if(CONFIG_SENSORS)
endif()
if(CONFIG_SENSORS_BH1749NUC)
- list(APPEND SRCS bh1749nuc.c)
+ list(APPEND SRCS bh1749nuc_base.c)
+ if(CONFIG_SENSORS_BH1749NUC_UORB)
+ list(APPEND SRCS bh1749nuc_uorb.c)
+ else()
+ list(APPEND SRCS bh1749nuc.c)
+ endif()
endif()
if(CONFIG_SENSORS_BH1750FVI)
@@ -186,6 +186,15 @@ if(CONFIG_SENSORS)
endif()
endif()
+ if(CONFIG_SENSORS_BMI088)
+ list(APPEND SRCS bmi088_base.c)
+ if(CONFIG_SENSORS_BMI088_UORB)
+ list(APPEND SRCS bmi088_uorb.c)
+ else()
+ list(APPEND SRCS bmi088.c)
+ endif()
+ endif()
+
if(CONFIG_SENSORS_BMP180)
list(APPEND SRCS bmp180_base.c)
if(CONFIG_SENSORS_BMP180_UORB)
@@ -193,7 +202,6 @@ if(CONFIG_SENSORS)
else()
list(APPEND SRCS bmp180.c)
endif()
-
endif()
if(CONFIG_SENSORS_BMP280)
@@ -216,6 +224,10 @@ if(CONFIG_SENSORS)
list(APPEND SRCS hts221.c)
endif()
+ if(CONFIG_SENSORS_LIS2MDL)
+ list(APPEND SRCS lis2mdl_uorb.c)
+ endif()
+
if(CONFIG_LM75_I2C)
list(APPEND SRCS lm75.c)
endif()
@@ -232,6 +244,10 @@ if(CONFIG_SENSORS)
list(APPEND SRCS mb7040.c)
endif()
+ if(CONFIG_SENSORS_MCP9600)
+ list(APPEND SRCS mcp9600_uorb.c)
+ endif()
+
if(CONFIG_SENSORS_MCP9844)
list(APPEND SRCS mcp9844.c)
endif()
@@ -256,10 +272,6 @@ if(CONFIG_SENSORS)
list(APPEND SRCS ltc4151.c)
endif()
- if(CONFIG_SENSORS_LIS2MDL)
- list(APPEND SRCS lis2mdl_uorb.c)
- endif()
-
if(CONFIG_SENSORS_INA219)
list(APPEND SRCS ina219.c)
endif()
@@ -334,6 +346,10 @@ if(CONFIG_SENSORS)
list(APPEND SRCS adxl345_spi.c)
endif()
+ if(CONFIG_SENSORS_ADXL362)
+ list(APPEND SRCS adxl362_uorb.c)
+ endif()
+
if(CONFIG_SENSORS_ADXL372)
if(CONFIG_SENSORS_ADXL372_UORB)
list(APPEND SRCS adxl372_uorb.c)
@@ -382,16 +398,6 @@ if(CONFIG_SENSORS)
list(APPEND SRCS as5048a.c)
endif()
- if(CONFIG_SENSORS_BMI088)
- list(APPEND SRCS bmi088_base.c)
- if(CONFIG_SENSORS_BMI088_UORB)
- list(APPEND SRCS bmi088_uorb.c)
- else()
- list(APPEND SRCS bmi088.c)
- endif()
-
- endif()
-
endif() # CONFIG_SPI
# These drivers depend on 1WIRE support
@@ -454,6 +460,12 @@ if(CONFIG_SENSORS)
list(APPEND SRCS hdc1008.c)
endif()
+ # ANALOG MAX31865
+
+ if(CONFIG_SENSORS_MAX31865)
+ list(APPEND SRCS max31865.c)
+ endif()
+
# SONY CXD5602PWBIMU
if(CONFIG_SENSORS_CXD5602PWBIMU)