Skip to content
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/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ source "$PKGS_DIR/packages/peripherals/ikun-485/Kconfig"
source "$PKGS_DIR/packages/peripherals/Servo_sg90/Kconfig"
source "$PKGS_DIR/packages/peripherals/sean_ws2812b/Kconfig"
source "$PKGS_DIR/packages/peripherals/ic74hc165/Kconfig"
source "$PKGS_DIR/packages/peripherals/ist8310/Kconfig"

if RT_VER_NUM > 0x40101
source "$PKGS_DIR/packages/peripherals/spi-tools/Kconfig"
Expand Down
68 changes: 68 additions & 0 deletions peripherals/ist8310/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# drivers/sensors/ist8310/Kconfig

menuconfig PKG_USING_IST8310
bool "IST8310: 3-axis magnetometer driver package"
default n
select RT_USING_I2C
help
A driver package for IST8310 3-axis magnetometer

if PKG_USING_IST8310

config PKG_IST8310_PATH
string
default "/packages/peripherals/ist8310"

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

config PKG_USING_IST8310_LATEST_VERSION
bool "latest"
endchoice

config PKG_IST8310_VER
string
default "latest" if PKG_USING_IST8310_LATEST_VERSION

config PKG_USING_IST8310_SAMPLE
bool "Enable ist8310 sample"
default n
if PKG_USING_IST8310_SAMPLE
config IST8310_SAMPLE_I2C_DEV_NAME
string "i2c dev name with ist8310"
default "i2c2"
endif

config IST8310_USING_MAG
bool "Enable ist8310 mag"
default y
help
Enable magnetometer function

config IST8310_USING_SOFT_FILTER
bool "Enable software filter"
default n
depends on IST8310_USING_MAG
help
Enable software filter for smoothing data

if IST8310_USING_SOFT_FILTER
config IST8310_SAMPLE_PERIOD
int "Sample period (ms)"
default 100
range 10 1000
help
Set the sampling period in milliseconds

config IST8310_AVERAGE_TIMES
int "Average times"
default 5
range 1 20
help
Set the number of samples for averaging
endif

endif
34 changes: 34 additions & 0 deletions peripherals/ist8310/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "ist8310",
"description": "A driver package for IST8310 3-axis magnetometer",
"description_zh": "IST8310三轴磁力计驱动软件包",
"enable": "PKG_USING_IST8310",
"keywords": [
"ist8310",
"magnetometer"
],
"category": "peripherals",
"author": {
"name": "Yuqiang Wang",
"email": "[email protected]",
"github": "kurisaW"
},
"license": "Apache-2.0",
"repository": "https://github.com/kurisaW/ist8310",
"homepage": "https://github.com/kurisaW/ist8310#readme",
"site": [
{
"version": "v1.0.0",
"URL": "https://github.com/kurisaW/ist8310/archive/refs/tags/v1.0.0.zip",
"filename": "ist8310-1.0.0.zip",
"VER_SHA": ""
},
{
"version": "latest",
"URL": "https://github.com/kurisaW/ist8310.git",
"filename": "ist8310.zip",
"VER_SHA": "main"
}
],
"doc": "https://github.com/kurisaW/ist8310/blob/main/README.md"
}
Loading