Skip to content

Commit 3b3d487

Browse files
committed
drivers: sensor: Add driver for MAX32664C
- Add DTS for MAX32664C - Add driver for MAX32664C - Add example for MAX32664C Heart rate measurement with Bluetooth Closes: #93473 Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
1 parent 578ec1e commit 3b3d487

File tree

17 files changed

+2348
-31
lines changed

17 files changed

+2348
-31
lines changed

drivers/sensor/adi/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ add_subdirectory_ifdef(CONFIG_ADXL345 adxl345)
1010
add_subdirectory_ifdef(CONFIG_ADXL362 adxl362)
1111
add_subdirectory_ifdef(CONFIG_ADXL367 adxl367)
1212
add_subdirectory_ifdef(CONFIG_ADXL372 adxl372)
13+
add_subdirectory_ifdef(CONFIG_MAX32664C max32664c)
1314
# zephyr-keep-sorted-stop

drivers/sensor/adi/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ source "drivers/sensor/adi/adxl345/Kconfig"
1010
source "drivers/sensor/adi/adxl362/Kconfig"
1111
source "drivers/sensor/adi/adxl367/Kconfig"
1212
source "drivers/sensor/adi/adxl372/Kconfig"
13+
source "drivers/sensor/adi/max32664c/Kconfig"
1314
# zephyr-keep-sorted-stop
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
zephyr_library()
4+
5+
zephyr_sources_ifdef(CONFIG_MAX32664C_USE_FIRMWARE_LOADER max32664c_bl.c)
6+
7+
zephyr_sources_ifdef(CONFIG_MAX32664C max32664c.c
8+
max32664c_worker.c
9+
max32664c_init.c
10+
)

drivers/sensor/adi/max32664c/Kconfig

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright(c) 2025, Daniel Kampert
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config MAX32664C
5+
bool "MAX32664C Driver"
6+
default y
7+
depends on DT_HAS_MAXIM_MAX32664C_ENABLED
8+
select I2C
9+
help
10+
Enable the driver for the MAX32664C biometric sensor hub.
11+
12+
if MAX32664C
13+
config MAX32664C_USE_FIRMWARE_LOADER
14+
bool "Enable this option if you want to use the I2C firmware loader"
15+
default n
16+
17+
config MAX32664C_USE_EXTERNAL_ACC
18+
bool "Enable this option if you want to use an external accelerometer"
19+
default n
20+
21+
config MAX32664C_USE_EXTENDED_REPORTS
22+
bool "Enable this option if you want to use extended reports instead of the default reports"
23+
default n
24+
25+
config MAX32664C_USE_STATIC_MEMORY
26+
bool "Disable this option if the driver should use dynamic memory"
27+
default y
28+
29+
config MAX32664C_QUEUE_SIZE
30+
int "Length of the message queue"
31+
default 32
32+
33+
config MAX32664C_SAMPLE_BUFFER_SIZE
34+
depends on MAX32664C_USE_STATIC_MEMORY
35+
int "Length of the sample buffer for the I2C reading thread"
36+
default 64
37+
help
38+
This is the number of samples that will be read from the sensor hub in one go.
39+
The maximum value is 64, but you can set it lower if you want to reduce memory usage.
40+
41+
choice
42+
prompt "AFE sensor ID used by the sensor hub"
43+
default MAX32664C_USE_MAX86161
44+
45+
config MAX32664C_USE_MAX86141
46+
bool "MAX86141"
47+
48+
config MAX32664C_USE_MAX86161
49+
bool "MAX86161"
50+
endchoice
51+
52+
config MAX32664C_ACC_ID
53+
hex "Accelerometer ID sensor ID used by the sensor hub"
54+
default 0x1B
55+
56+
config MAX32664C_THREAD_STACK_SIZE
57+
int "MAX32664C sample thread stack size"
58+
default 4096
59+
60+
module = MAXIM_MAX32664C
61+
module-str = MAXIM_MAX32664C
62+
source "subsys/logging/Kconfig.template.log_config"
63+
64+
endif

0 commit comments

Comments
 (0)