Skip to content

Commit 1ffee17

Browse files
kurisaWmysterywolf
authored andcommitted
aht10 adapt to sensor v2 frame
1 parent 75eab24 commit 1ffee17

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

peripherals/sensors/aht10/Kconfig

+22-6
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,37 @@ if PKG_USING_AHT10
1010
string
1111
default "/packages/peripherals/sensors/aht10"
1212

13-
config AHT10_USING_SOFT_FILTER
13+
config PKG_AHT10_USING_SOFT_FILTER
1414
bool "Enable average filter by software"
1515
default n
1616
help
1717
"It will automatic sample sensor's data by average filter thread."
1818

19-
config AHT10_USING_SENSOR_DEVICE
19+
config PKG_AHT10_USING_SENSOR_V2
2020
bool "Enable sensor divce framework"
21+
depends on RT_VER_NUM >= 0x50001
2122
select RT_USING_SENSOR
23+
select RT_USING_SENSOR_V2
2224
default n
25+
26+
config PKG_USING_AHT10_SAMPLE
27+
bool "Enable aht10 sample"
28+
default n
29+
if PKG_USING_AHT10_SAMPLE
30+
config PKG_AHT10_I2C_BUS_NAME
31+
string "The name of the I2C bus used by AHT10"
32+
default "i2c3"
33+
endif
2334

24-
if AHT10_USING_SOFT_FILTER
35+
if PKG_AHT10_USING_SOFT_FILTER
2536

26-
config AHT10_AVERAGE_TIMES
37+
config PKG_AHT10_AVERAGE_TIMES
2738
int "The number of averaging"
2839
default 10
2940
help
3041
"When selected filter function, it will be the number you will average."
3142

32-
config AHT10_SAMPLE_PERIOD
43+
config PKG_AHT10_SAMPLE_PERIOD
3344
int "Peroid of sampling data(unit ms)"
3445
default 1000
3546
help
@@ -43,7 +54,11 @@ if PKG_USING_AHT10
4354

4455
config PKG_USING_AHT10_LATEST_VERSION
4556
bool "latest"
46-
depends on RT_VER_NUM >= 0x50000
57+
depends on RT_VER_NUM >= 0x50001
58+
59+
config PKG_USING_AHT10_V300
60+
bool "v3.0.0"
61+
depends on RT_VER_NUM >= 0x50001 || RT_USING_SENSOR_V2
4762

4863
config PKG_USING_AHT10_V210
4964
bool "v2.1.0"
@@ -64,6 +79,7 @@ if PKG_USING_AHT10
6479
default "v1.0.0" if PKG_USING_AHT10_V100
6580
default "v2.0.0" if PKG_USING_AHT10_V200
6681
default "v2.1.0" if PKG_USING_AHT10_V210
82+
default "v3.0.0" if PKG_USING_AHT10_V300
6783
default "latest" if PKG_USING_AHT10_LATEST_VERSION
6884

6985
endif

0 commit comments

Comments
 (0)