Skip to content

✨ feat(sensor): 增加icm20948软件包 #1897

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

Merged
merged 2 commits into from
Jun 9, 2025
Merged
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
1 change: 1 addition & 0 deletions peripherals/sensors/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ source "$PKGS_DIR/packages/peripherals/sensors/PAJ7620/Kconfig"
source "$PKGS_DIR/packages/peripherals/sensors/sths34pf80/Kconfig"
source "$PKGS_DIR/packages/peripherals/sensors/p3t1755/Kconfig"
source "$PKGS_DIR/packages/peripherals/sensors/qmi8658/Kconfig"
source "$PKGS_DIR/packages/peripherals/sensors/icm20948/Kconfig"

endmenu
46 changes: 46 additions & 0 deletions peripherals/sensors/icm20948/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

# Kconfig file for package icm20948
menuconfig PKG_USING_ICM20948
bool "icm20948 sensor driver package, support: accelerometer, gyroscope."
select RT_USING_SENSOR
default n

if PKG_USING_ICM20948

config PKG_ICM20948_PATH
string
default "/packages/peripherals/sensors/icm20948"

config PKG_ICM20948_USING_SAMPLE
bool "Enable icm20948 sample"
default n

choice
prompt "I2C device address type"
default PKG_ICM20948_I2C_ADDR_TYPE_LOW
help
Select I2C device address type: if SA0=0 -> I2C_DEVICE_TYPE_LOW if SA0=1 -> I2C_DEVICE_TYPE_HIGH

config PKG_ICM20948_I2C_ADDR_TYPE_HIGH
bool "I2C address high. if SA0 pad connect to VCC, select me"

config PKG_ICM20948_I2C_ADDR_TYPE_LOW
bool "I2C address low. if SA0 pad connect to GND, select me"
endchoice

choice
prompt "Version"
default PKG_USING_ICM20948_LATEST_VERSION
help
Select the package version

config PKG_USING_ICM20948_LATEST_VERSION
bool "latest"
endchoice

config PKG_ICM20948_VER
string
default "latest" if PKG_USING_ICM20948_LATEST_VERSION

endif

28 changes: 28 additions & 0 deletions peripherals/sensors/icm20948/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "icm20948",
"description": "Inven's icm20948 driver,support Accel/gyro",
"description_zh": "Inven的icm20948传感器驱动, 支持加速度计/陀螺仪",
"enable": "PKG_USING_ICM20948",
"keywords": [
"icm20948"
],
"category": "peripherals/sensors",
"author": {
"name": "juzhango",
"email": "[email protected]",
"github": "juzhango"
},
"license": "Apache-2.0",
"repository": "https://github.com/juzhango/icm20948.git",
"icon": "unknown",
"homepage": "https://github.com/juzhango/icm20948.git#readme",
"doc": "unknown",
"site": [
{
"version": "latest",
"URL": "https://github.com/juzhango/icm20948.git",
"filename": "icm20948.zip",
"VER_SHA": "main"
}
]
}
Loading