Skip to content

Commit e6f256f

Browse files
authored
✨ feat(sensor): 增加icm20948软件包 (#1897)
1 parent f728415 commit e6f256f

File tree

3 files changed

+75
-0
lines changed

3 files changed

+75
-0
lines changed

peripherals/sensors/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,6 @@ source "$PKGS_DIR/packages/peripherals/sensors/PAJ7620/Kconfig"
7070
source "$PKGS_DIR/packages/peripherals/sensors/sths34pf80/Kconfig"
7171
source "$PKGS_DIR/packages/peripherals/sensors/p3t1755/Kconfig"
7272
source "$PKGS_DIR/packages/peripherals/sensors/qmi8658/Kconfig"
73+
source "$PKGS_DIR/packages/peripherals/sensors/icm20948/Kconfig"
7374

7475
endmenu
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
# Kconfig file for package icm20948
3+
menuconfig PKG_USING_ICM20948
4+
bool "icm20948 sensor driver package, support: accelerometer, gyroscope."
5+
select RT_USING_SENSOR
6+
default n
7+
8+
if PKG_USING_ICM20948
9+
10+
config PKG_ICM20948_PATH
11+
string
12+
default "/packages/peripherals/sensors/icm20948"
13+
14+
config PKG_ICM20948_USING_SAMPLE
15+
bool "Enable icm20948 sample"
16+
default n
17+
18+
choice
19+
prompt "I2C device address type"
20+
default PKG_ICM20948_I2C_ADDR_TYPE_LOW
21+
help
22+
Select I2C device address type: if SA0=0 -> I2C_DEVICE_TYPE_LOW if SA0=1 -> I2C_DEVICE_TYPE_HIGH
23+
24+
config PKG_ICM20948_I2C_ADDR_TYPE_HIGH
25+
bool "I2C address high. if SA0 pad connect to VCC, select me"
26+
27+
config PKG_ICM20948_I2C_ADDR_TYPE_LOW
28+
bool "I2C address low. if SA0 pad connect to GND, select me"
29+
endchoice
30+
31+
choice
32+
prompt "Version"
33+
default PKG_USING_ICM20948_LATEST_VERSION
34+
help
35+
Select the package version
36+
37+
config PKG_USING_ICM20948_LATEST_VERSION
38+
bool "latest"
39+
endchoice
40+
41+
config PKG_ICM20948_VER
42+
string
43+
default "latest" if PKG_USING_ICM20948_LATEST_VERSION
44+
45+
endif
46+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "icm20948",
3+
"description": "Inven's icm20948 driver,support Accel/gyro",
4+
"description_zh": "Inven的icm20948传感器驱动, 支持加速度计/陀螺仪",
5+
"enable": "PKG_USING_ICM20948",
6+
"keywords": [
7+
"icm20948"
8+
],
9+
"category": "peripherals/sensors",
10+
"author": {
11+
"name": "juzhango",
12+
"email": "[email protected]",
13+
"github": "juzhango"
14+
},
15+
"license": "Apache-2.0",
16+
"repository": "https://github.com/juzhango/icm20948.git",
17+
"icon": "unknown",
18+
"homepage": "https://github.com/juzhango/icm20948.git#readme",
19+
"doc": "unknown",
20+
"site": [
21+
{
22+
"version": "latest",
23+
"URL": "https://github.com/juzhango/icm20948.git",
24+
"filename": "icm20948.zip",
25+
"VER_SHA": "main"
26+
}
27+
]
28+
}

0 commit comments

Comments
 (0)