Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sensor]修正选中V2时又同时选中V1导致的编译冲突 #7747

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions components/drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ config RT_USING_SPI
bool "Using Serial Flash Universal Driver"
default n
help
An using JEDEC's SFDP standard serial (SPI) flash universal driver library
"An using JEDEC's SFDP standard serial (SPI) flash universal driver library"

if RT_USING_SFUD
config RT_SFUD_USING_SFDP
Expand Down Expand Up @@ -368,12 +368,19 @@ config RT_USING_SENSOR
bool "Using Sensor device drivers"
select RT_USING_PIN
default n
if RT_USING_SENSOR
choice
prompt "Enable Sensor Framework"
default RT_USING_SENSOR_V1

if RT_USING_SENSOR
config RT_USING_SENSOR_V2
bool "Enable Sensor Framework v2"
default n
config RT_USING_SENSOR_V1
bool " v1"
config RT_USING_SENSOR_V2
bool " v2"
endchoice
endif

if RT_USING_SENSOR
config RT_USING_SENSOR_CMD
bool "Using Sensor cmd"
select PKG_USING_RT_VSNPRINTF_FULL if RT_USING_SENSOR_V2
Expand Down
4 changes: 2 additions & 2 deletions components/drivers/sensor/v1/SConscript
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SConscript for sensor framework
# SConscript for sensor framework

from building import *

Expand All @@ -7,6 +7,6 @@ src = ['sensor.c']
if GetDepend('RT_USING_SENSOR_CMD'):
src += ['sensor_cmd.c']

group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_SENSOR'])
group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_SENSOR_V1'])

Return('group')