From b49c6ef58ec498295188f2f207901baff727817f Mon Sep 17 00:00:00 2001 From: lgnq Date: Fri, 24 Jan 2025 10:56:16 +0800 Subject: [PATCH 1/2] add Melexis MLX90382 package --- peripherals/sensors/Kconfig | 1 + peripherals/sensors/mlx90382/Kconfig | 32 +++++++++++++++++++++++ peripherals/sensors/mlx90382/package.json | 28 ++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 peripherals/sensors/mlx90382/Kconfig create mode 100644 peripherals/sensors/mlx90382/package.json diff --git a/peripherals/sensors/Kconfig b/peripherals/sensors/Kconfig index 1b5430eaaf..26a6e59e7c 100755 --- a/peripherals/sensors/Kconfig +++ b/peripherals/sensors/Kconfig @@ -38,6 +38,7 @@ source "$PKGS_DIR/packages/peripherals/sensors/ccs811/Kconfig" source "$PKGS_DIR/packages/peripherals/sensors/pmsxx/Kconfig" source "$PKGS_DIR/packages/peripherals/sensors/rt3020/Kconfig" source "$PKGS_DIR/packages/peripherals/sensors/mlx90632/Kconfig" +source "$PKGS_DIR/packages/peripherals/sensors/mlx90382/Kconfig" source "$PKGS_DIR/packages/peripherals/sensors/mlx90393/Kconfig" source "$PKGS_DIR/packages/peripherals/sensors/mlx90392/Kconfig" source "$PKGS_DIR/packages/peripherals/sensors/mlx90394/Kconfig" diff --git a/peripherals/sensors/mlx90382/Kconfig b/peripherals/sensors/mlx90382/Kconfig new file mode 100644 index 0000000000..80e30d8955 --- /dev/null +++ b/peripherals/sensors/mlx90382/Kconfig @@ -0,0 +1,32 @@ + +# Kconfig file for package mlx90382 +menuconfig PKG_USING_MLX90382 + bool "a mlx90382 package for rt-thread." + default n + +if PKG_USING_MLX90382 + + config PKG_MLX90382_PATH + string + default "/packages/peripherals/sensors/mlx90382" + + choice + prompt "Version" + default PKG_USING_MLX90382_LATEST_VERSION + help + Select the package version + + config PKG_USING_MLX90382_V100 + bool "v1.0.0" + + config PKG_USING_MLX90382_LATEST_VERSION + bool "latest" + endchoice + + config PKG_MLX90382_VER + string + default "v1.0.0" if PKG_USING_MLX90382_V100 + default "latest" if PKG_USING_MLX90382_LATEST_VERSION + +endif + diff --git a/peripherals/sensors/mlx90382/package.json b/peripherals/sensors/mlx90382/package.json new file mode 100644 index 0000000000..d98b5eb407 --- /dev/null +++ b/peripherals/sensors/mlx90382/package.json @@ -0,0 +1,28 @@ +{ + "name": "mlx90382", + "description": "The MLX90382 is a compact, absolute magnetic encoder IC. It features stray field immunity, supports both on-axis and off-axis sensing, 14-bit resolution, differential outputs and a speed range of up to 200k e-RPM", + "description_zh": "MLX90382 是来自迈来芯公司的一颗高速磁编码器", + "enable": "PKG_USING_MLX90382", + "keywords": [ + "mlx90382" + ], + "category": "peripherals/sensors", + "author": { + "name": "lgnq", + "email": "dzzxzz@gmail.com", + "github": "lgnq" + }, + "license": "Apache-2.0", + "repository": "https://github.com/lgnq/mlx90382", + "icon": "unknown", + "homepage": "https://github.com/lgnq/mlx90382", + "doc": "unknown", + "site": [ + { + "version": "latest", + "URL": "https://github.com/lgnq/mlx90382.git", + "filename": "mlx90382.zip", + "VER_SHA": "main" + } + ] +} From eee3e60100c8d61265d0ceee0c9f986d3de54886 Mon Sep 17 00:00:00 2001 From: lgnq Date: Mon, 27 Jan 2025 11:16:52 +0800 Subject: [PATCH 2/2] Update Kconfig add PKG_MLX90382_USING_SENSOR_V1 configuration --- peripherals/sensors/mlx90382/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/peripherals/sensors/mlx90382/Kconfig b/peripherals/sensors/mlx90382/Kconfig index 80e30d8955..94cd1e34c8 100644 --- a/peripherals/sensors/mlx90382/Kconfig +++ b/peripherals/sensors/mlx90382/Kconfig @@ -6,6 +6,11 @@ menuconfig PKG_USING_MLX90382 if PKG_USING_MLX90382 + config PKG_MLX90382_USING_SENSOR_V1 + bool "Enable sensor divce framework" + select RT_USING_SENSOR + default n + config PKG_MLX90382_PATH string default "/packages/peripherals/sensors/mlx90382" @@ -28,5 +33,9 @@ if PKG_USING_MLX90382 default "v1.0.0" if PKG_USING_MLX90382_V100 default "latest" if PKG_USING_MLX90382_LATEST_VERSION + config PKG_USING_MLX90382_SAMPLE + bool "Enable mlx90382 sample" + default n + endif